This package provides Neolution's .eslintrc as an extensible shared config.
# inside your project's working tree
yarn add -D @neolution-ch/eslint-config-neolution
Edit the .eslintrc.js
of your project:
module.exports = {
...
extends: ["@neolution-ch/eslint-config-neolution"],
...
}
For React project you might need to adjust the "@typescript-eslint/naming-convention" rule to allow PascalCase for component names.
module.exports = {
...
rules: {
"@typescript-eslint/naming-convention": ["error", {
selector: "default",
format: ["camelCase", "PascalCase"],
leadingUnderscore: "allow",
},
{
selector: ["typeLike", "accessor", "enumMember"],
format: ["PascalCase"],
}],
}
...
}