eslint-plugin-package-json
Rules for valid, consistent, and readable package.json files
Last updated a year ago by jzetlen .
(OSL-3.0 OR AFL-3.0) · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-plugin-package-json 
SYNC missed versions from official npm registry.

eslint-plugin-package-json

Rules for valid, consistent, and readable package.json files

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-package-json:

$ npm install eslint-plugin-package-json --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-package-json globally.

Usage

Add package-json to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": ["package-json"]
}

Use the prepackaged config by adding an "extends" property, or appending to an existing "extends" property:

{
    "extends": ["eslint:recommended", "plugin:package-json/recommended"],
    "plugins": ["package-json"]
}

Or, individually configure the rules you want to use under the rules section.

{
    "rules": {
        "package-json/rule-name": 2
    }
}

Supported Rules

These rules only run on package.json files; they will ignore all other files being linted. They lint package.json files at project root, and in any subfolder of the project, making this plugin great for monorepos.

Current Tags

  • 0.1.4                                ...           latest (a year ago)

5 Versions

  • 0.1.4                                ...           a year ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 20
Dependencies (3)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |