The customized ESLint rules insides LiteRT ORG.
npm i --save-dev @litert/eslint-plugin-rules
Put these configuration in your eslint.config.js
:
// eslint.config.js
const LitertEslintRules = require('@litert/eslint-plugin-rules');
module.exports = [
...LitertEslintRules.configs.typescript,
{
plugins: {
'@litert/rules': require('@litert/eslint-plugin-rules'),
},
files: [
'src/**/*.ts',
],
languageOptions: {
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
},
},
rules: {
// add other customized rules here.
},
}
];
-
@litert/general/disable-for-each-method
Disabling the method
Array.prototype.forEach
.
Click here to read the default rules.