@cancercentrum/eslint-config-rcc
v2.0.6
Published
ESLint rules for RCC projects
Downloads
1,418
Maintainers
Readme
eslint-config-rcc
ESLint rules for @cancercentrum.
Installation
Install the configuration with:
yarn add --dev @cancercentrum/eslint-config-rcc
We recommend using the --dev
flag because ESLint and its configurations are only needed during development and should not be included in production dependencies.
Usage
React
For projects using React with TypeScript (for JavaScript use /react.js
), add this to your eslint.config.js:
import rccConfig from "@cancercentrum/eslint-config-rcc/react-ts.js";
export default [...rccConfig];
Add or override rules
To add or override rules, you can modify or extend the configuration as needed. For example:
import rccConfig from "@cancercentrum/eslint-config-rcc/react-ts.js";
export default [
...rccConfig,
{
rules: {
// Add or override rules specific to your project
"no-console": "warn"
}
}
];
TypeScript
If your project uses TypeScript, make sure you also install typescript as a dependency:
yarn add --dev typescript
Then, the configuration works seamlessly with TypeScript files.