eslint-plugin-package-json-dependencies
v1.0.20
Published
A plugin for package json dependencies
Downloads
28,743
Maintainers
Readme
eslint-plugin-package-json-dependencies
This plugin contains rules for maintaining a valid, consistent package.json
dependency setup.
Installation
npm install --save-dev eslint eslint-plugin-package-json-dependencies
Usage
- Add the plugin and its parser to your eslint config file
overrides
section:
// eslintrc.json
{
"overrides": [
{
"files": ["*.json"],
"parser": "eslint-plugin-package-json-dependencies",
"plugins": ["package-json-dependencies"]
}
]
}
- Apply the specific rules applicable to your repo, e.g.:
// eslintrc.json
{
"rules": {
"package-json-dependencies/no-missing-types": "error"
}
}
Available Rules
- no-missing-types
- alphabetically-sorted-dependencies
- controlled-versions
- better-alternative
- valid-versions
- duplicate-dependencies
Development
npm install
npm test
npm run format