eslint-plugin-clutter
v0.1.2
Published
ESLint plugin for detecting redundant and unnecessary dependencies.
Downloads
2
Maintainers
Readme
eslint-plugin-clutter
ESLint plugin for detecting micro-dependencies and redundant packages.
The JavaScript ecosystem is filled with clutter:
- Micro-packages - one-liners, often with native equivalents you should use instead
- Obsolete packages - packages made obsolete by a better, newer package. NPM should take care of this but not all authors remember to mark their packages as obsolete
- Obsolete packages (native replacements) - packages no longer needed because the platform (e.g. browsers, node, etc.) support the functionality out of the box
Micro-packages are a bad idea, a horrible idea. They are high risk, often untrusted and usually completely unnecessary. Let's get rid of them.
Install
$ npm i -D eslint eslint-plugin-clutter
Usage
Add clutter
to the plugins section of your .eslintrc
file:
{
"plugins": ["clutter"]
}
Configure your rules like so:
{
"rules": {
"clutter/no-unnecessary-dependency": "error"
}
}
Configuration
You may also extend the recommended configuration like so:
{
"extends": ["plugin:clutter/recommended"]
}
Supported Rules
Possible Errors (recommended)
| Rule | | | ----------------------------------------------------------------------- | ----------------------------------------------------- | | clutter/no-unnecessary-dependency | Disallows unnecessary dependencies |