eslint-plugin-pkg-json
v0.1.1
Published
ESLint plugin for linting package.json file
Downloads
504
Maintainers
Readme
eslint-plugin-pkg-json
ESLint plugin for linting package.json
file.
Features
- Lint
package.json
s. - Simple. Tiny. Fast.
- Zero dependencies.
Requirement
- ESLint >= 8.57.0
Usage
Install
npm i eslint eslint-plugin-pkg-json -D
Config eslint.config.js
import * as pkg from "eslint-plugin-pkg-json";
export default [
...
{
files: ["**/package.json"],
processor: "pkg-json/processor",
plugins: { "pkg-json": pkg },
rules: {
"pkg-json/no-lifecycle-script": "error",
...
// Visit https://github.com/zanminkian/git-validator/tree/main/packages/eslint-plugin-pkg-json/doc/rules for more other rules
},
},
...
];
Config package.json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Rules
Click here.
License
MIT