eslint-plugin-json-light-pmb

(2022 maintenance fork) Light ESLint plugin for JSON validating

ISC 3 个版本
安装
npm install eslint-plugin-json-light-pmb
yarn add eslint-plugin-json-light-pmb
pnpm add eslint-plugin-json-light-pmb
bun add eslint-plugin-json-light-pmb
README

eslint-plugin-json-light-pmb

Because eslint-plugin-json install is too heavy (phantomjs download, ~22MB) 😒

Installation

ESLint

npm i eslint --save-dev
npm i eslint-plugin-json-light-pmb --save-dev

If you installed ESLint package globally - you should also install this plugin globally

Usage

.eslintrc.js (or other ESLint config)

{
   "plugins": [
      "json-light"
   ]
}

If you are using lint-staged don't forget about .json extension:

{
   "lint-staged": {
      "*.{js,json}": [
         "eslint"
      ]
   }
}

Also you can run ESLint on individual JSON files or through --ext flag to add JSON files to the list.

eslint . --ext .json --ext .js
eslint fixture.json
版本列表
1.0.7 2022-03-25
1.0.5 2022-03-25
1.0.4 2022-03-22