
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
eslint-plugin-json-files
Advanced tools
ESLint JSON processor and rules
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-json-files
:
$ npm install eslint-plugin-json-files --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-json-files
globally.
Add json-files
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"json-files"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"json-files/rule-name": "error"
}
}
Don't forget to use the extension option.
eslint . --ext js,json
Rule ID | Description |
---|---|
json-files/ensure-repository-directory | ensure repository/directory in package.json |
json-files/ensure-volta-extends | ensure volta-extends in package.json |
json-files/ensure-workspaces | ensure workspace globs in package.json resolve to directories |
json-files/eol-last | require or disallow newline at the end of package.json |
json-files/no-branch-in-dependencies | prevent branches in package.json dependencies |
json-files/require-engines | require the engines field in package.json |
json-files/require-license | require a license in package.json |
json-files/require-unique-dependency-names | prevent duplicate packages in dependencies and devDependencies |
json-files/restrict-ranges | restrict the dependency ranges in package.json |
json-files/sort-package-json | enforce package.json sorting |
json-files/validate-schema | require a valid JSON Schema |
I wouldn't mind getting this merged into eslint-plugin-node or eslint-plugin-json.
FAQs
ESLint JSON processor and rules
The npm package eslint-plugin-json-files receives a total of 39,452 weekly downloads. As such, eslint-plugin-json-files popularity was classified as popular.
We found that eslint-plugin-json-files demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.