@brettz9/eslint-plugin
v3.0.0
Published
Additional ESLint rules.
Downloads
2,299
Maintainers
Readme
@brettz9/eslint-plugin
Additional ESLint rules and ESLint configurations. A fork of @mysticatea/eslint-plugin which extracts the rules without all of the config.
💿 Installation
npm install --save-dev eslint @brettz9/eslint-plugin
📖 Usage
Add to your ESLint configuration: https://eslint.org/docs/user-guide/configuring#using-the-configuration-from-a-plugin
Configs
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.
Rules
- @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).
🚥 Semantic Versioning Policy
This plugin follows semantic versioning and ESLint's Semantic Versioning Policy.
📰 Changelog
❤️ Contributing
Contributons are welcome!
Please use GitHub's Issues/PRs.
Development Tools
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.