This package provides a shared ESLint configuration for Singular projects.
npm install --save-dev @we-are-singular/eslint-config
This function is used to create an ESLint configuration object. it just deeply merges the provided arguments.
This function is used to create an ESLint configuration object. it extends the presets.all configuration and merge the provided arguments.
list of presets that can be used to create an ESLint configuration object.
list of override factories that can be used to create an ESLint overwrite rule.
// .eslintrc.js
const { config, overrides, presets } = require("@we-are-singular/eslint-config")
module.exports = config(
// some presets
presets.react,
presets.typescript,
// your rules
{
rules: {
"no-console": "warn",
},
overrides: [
// some overrides
overrides.vitestNode(["apps/backend", "packages/logger"]),
// your rules
{
files: ["*.test.ts", "*.test.tsx"],
rules: {
"no-console": "off",
},
},
],
}
)
// .eslintrc.js
const { extend, overrides } = require("@we-are-singular/eslint-config")
module.exports = extend({
rules: {
"no-console": "warn",
},
overrides: [
// some overrides
overrides.vitestNode(["apps/backend", "packages/logger"]),
// your rules
{
files: ["*.test.ts", "*.test.tsx"],
rules: {
"no-console": "off",
},
},
],
})
// .eslintrc.js
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@we-are-singular/eslint-config/all"],
overrides: [
// your rules
{
files: ["*.test.ts", "*.test.tsx"],
rules: {
"no-console": "off",
},
},
],
}
To release a new version, you need to have access to the @we-are-singular
npm organization.
- Make sure you are logged in to the
@we-are-singular
npm organization by runningnpm login
and following the instructions. - Run
npm run release
to trigger the release process. - Follow the instructions and make sure to select the correct version type.
- The release will be published to npm and github automatically.