eslint-plugin-json-light

raw JSON →
1.0.3 verified Sat Apr 25 auth: no javascript maintenance

ESLint plugin for validating JSON files. Version 1.0.3 (last updated in 2016, no releases since). Lightweight alternative to eslint-plugin-json, which required downloading PhantomJS (~22MB). This plugin has zero dependencies and simply parses JSON files to report syntax errors. Key differentiator is its minimal footprint, but it lacks features like auto-fix or extended syntax checks. Suitable for basic JSON linting in ESLint workflows.

error ESLint couldn't find the plugin "eslint-plugin-json-light".
cause Plugin not installed or not in package.json dependencies.
fix
Run: npm install eslint-plugin-json-light --save-dev
error Parsing error: Unexpected token }
cause JSON file contains a syntax error (e.g., extra comma).
fix
Fix the JSON syntax in the file.
error Error: .json files are ignored by default in ESLint. Use --ext .json or add 'json' to lint-staged patterns.
cause ESLint does not lint .json files by default.
fix
Run: eslint . --ext .json or configure lint-staged to include *.json
gotcha This plugin only validates JSON syntax; it does not provide any rules (like 'no-trailing-comma'). It only reports parse errors.
fix If you need JSON rules, consider eslint-plugin-json or write custom rules.
deprecated Last release was in 2016. Consider using modern alternatives like eslint-plugin-jsonc or eslint-plugin-json-format.
fix Migrate to eslint-plugin-jsonc (supports comments) or other actively maintained plugins.
gotcha Plugin is installed as 'eslint-plugin-json-light' but used in plugins array as 'json-light' (drop the prefix).
fix Add 'json-light' to plugins, not 'eslint-plugin-json-light'.
npm install eslint-plugin-json-light
yarn add eslint-plugin-json-light
pnpm add eslint-plugin-json-light

Shows installation and configuration to lint JSON files with ESLint.

// Install
// npm install eslint eslint-plugin-json-light --save-dev

// .eslintrc.js
module.exports = {
  plugins: ['json-light']
};

// Then lint JSON files:
// eslint . --ext .json --ext .js
// eslint fixture.json