An ESLint plugin for nitpicky rules.
npm install eslint-plugin-nitpickNitpicky ESLint rules.
```
npm install -D eslint eslint-plugin-nitpick
To use the recommended configuration:
`js
import nitpick from "eslint-plugin-nitpick";
export default [
// ...
nitpick.configs.recommended,
];
`
To turn on every rule:
`js
import nitpick from "eslint-plugin-nitpick";
export default [
// ...
nitpick.configs.all,
];
`
See more: Configuring Plugins.
πΌ Configurations enabled in.\
π Set in the all configuration.\recommended
β
Set in the configuration.\--fix
π§ Automatically fixable by the CLI option.\
π‘ Manually fixable by editor suggestions.
| NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | Description | πΌ | π§ | π‘ |
| :----------------------------------------------------------------- | :------------------------------------------------------------------------------------------------- | :---- | :-- | :-- |
| no-redundant-vars | Warns against variables that are returned without any other usage | π β
| | π‘ |
| no-useless-interpolation | Warns against template-literal interpolation with a literal | π β
| π§ | π‘ |
| no-useless-rest | Warns against using a rest element without destructuring other properties/elements | π β
| | π‘ |
| prefer-if-conditionals | Prefer an if statement to using logical operators (?:, && or \|\|) in expressions | π β
| π§ | π‘ |a !== b
| prefer-not-equals | Prefer using the not-equals operator () over inverting the equals operator (!(a === b)) | π β
| | π‘ |
| | Name |
| :-- | :------------ |
| π | all |recommended` |
| β
|