An ESLint plugin for linting JSON, JSONC, and JSON5 files with comprehensive rules and editor integrations.
eslint-plugin-jsonc is an ESLint plugin that provides linting rules for JSON, JSONC (JSON with Comments), and JSON5 files. It allows developers to enforce coding standards, detect errors, and maintain consistency in configuration files, localization files, and other JSON-based data formats. The plugin integrates fully with ESLint's ecosystem, supporting auto-fixing, directive comments, and editor integrations.
Developers working with JSON-based configuration files, localization files (e.g., Vue I18n), or data files who want to enforce code quality and consistency using ESLint's familiar tooling.
It offers a more robust and integrated solution than other JSON linting plugins by avoiding false positives, supporting multiple JSON variants, and providing a comprehensive rule set with auto-fix capabilities, all while maintaining compatibility with the broader ESLint ecosystem.
ESLint plugin for JSON(C|5)? files
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports JSON, JSONC, and JSON5 with dedicated configs like 'recommended-with-jsonc', allowing consistent linting across all JSON variants.
Fully integrates with ESLint's ecosystem, enabling directive comments, editor plugins, and compatibility with tools like eslint-plugin-prettier.
Many rules are auto-fixable, such as jsonc/auto, which applies similar linting to ESLint core rules and fixes issues automatically.
Uses a custom AST with renamed nodes to avoid false positives from ESLint core rules, ensuring accurate linting.
Requires Node.js v20.x, v22.x, or v24.x, which can be a barrier for projects on older or unsupported versions.
Setting up for non-standard uses, like experimental @eslint/json integration, is noted as potentially unstable and subject to changes.
Linting Vue SFC custom blocks requires vue-eslint-parser, adding an extra dependency for specific workflows.