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
I wouldn't mind getting this merged into eslint-plugin-node or eslint-plugin-json.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4