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