mirror of
https://github.com/EDCD/coriolis-data.git
synced 2025-12-10 15:55:35 +00:00
eslint-plugin-json
Lint JSON files
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-json:
$ npm install eslint-plugin-json --save-dev
Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-json globally.
Usage
Add json to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"json"
]
}
You can run ESLint on individual JSON files or you can use the --ext flag to add JSON files to the list.
eslint --ext .json --ext .js
eslint example.json