eslint-plugin-chotot
v4.0.0
Published
Assorted custom Chotot ESLint rules
Downloads
15
Maintainers
Readme
eslint-plugin-chotot
Collection of custom ESLint rules that are used by eslint-config-chotot
Propose or contribute a new rule ➡
Install
$ npm install --save-dev eslint eslint-plugin-unicorn
Usage
Configure it in package.json
.
{
"name": "my-awesome-project",
"eslintConfig": {
"env": {
"es6": true
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["chotot"],
"rules": {
"chotot/filename-case": "error",
"chotot/no-abusive-eslint-disable": "error"
}
}
}
Rules
- filename-case - Enforce a case style for filenames.
- no-abusive-eslint-disable - Enforce specifying rules to disable in
eslint-disable
comments.
Recommended config
This plugin exports a recommended
config that enforces good practices.
Enable it in your package.json
with the extends
option:
{
"name": "my-awesome-project",
"eslintConfig": {
"extends": "plugin:chotot/recommended"
}
}
See the ESLint docs for more information about extending config files.
Note: This config will also enable the correct parser options and environment.
Thanks
eslint-plugin-unicorn
for the repo structure and first couple of rules.