Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 2.02 KB

File metadata and controls

55 lines (42 loc) · 2.02 KB

eslint-plugin-package-json-dependencies

npm version Actions Status: build

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

  1. 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"]
    }
  ]
}
  1. Apply the specific rules applicable to your repo, e.g.:
// eslintrc.json
{
  "rules": {
    "package-json-dependencies/no-missing-types": "error"
  }
}

Available Rules

Development

  • npm install
  • npm test
  • npm run format