Additional ESLint rules and ESLint configurations. A fork of @mysticatea/eslint-plugin which extracts the rules without all of the config.
npm install --save-dev eslint @brettz9/eslint-plugin
Add to your ESLint configuration: https://eslint.org/docs/user-guide/configuring#using-the-configuration-from-a-plugin
plugin:@brettz9/es5
- Contains configuration of the project's rules suitable for ES5 (disabling arrow functions, etc.).plugin:@brettz9/es6
- Contains configuration suitable for ES2015 and above. For setting ES6+ globals, you will need to setenv
accordingly.plugin:@brettz9/es2015
- Alias fores6
config.
- @brettz9/arrow-parens enforces parens of argument lists (excludes too redundant parens) (fixable).
- @brettz9/block-scoped-var handles variables which are declared by
var
declaration as block-scoped. It disallows redeclarations, uses from outside of the scope, shadowing. - @brettz9/no-instanceof-array disallows 'instanceof' for Array (fixable).
- @brettz9/no-instanceof-wrapper disallows 'instanceof' for wrapper objects (fixable).
- @brettz9/no-literal-call disallows a call of a literal.
- @brettz9/no-this-in-static disallows
this
/super
in static methods. - @brettz9/no-use-ignored-vars disallows a use of ignored variables.
- @brettz9/no-useless-rest-spread disallows unnecessary rest/spread operators (fixable).
- @brettz9/prefer-for-of requires
for-of
statements instead ofArray#forEach
or something like (fixable).
This plugin follows semantic versioning and ESLint's Semantic Versioning Policy.
Contributons are welcome!
Please use GitHub's Issues/PRs.
npm test
runs tests and measures coverage.npm run clean
removes the coverage result ofnpm test
command.npm run coverage
shows the coverage result ofnpm test
command.npm run update
updates auto-generated files.npm run watch
runs tests and measures coverage when source code are changed.