An ESLint plugin providing a preprocessor to lint JSON5 files using standard ESLint rules for JavaScript objects. The plugin works by treating JSON5 files as JavaScript object literals, allowing all standard ESLint rules (e.g., no-undef, quotes) to apply. Current stable version is 0.1.4, with no major updates since 2020. It supports ESLint 3-8 via broad peer dependency range. Key differentiator: avoids writing separate JSON5-specific rules by reusing existing ESLint infrastructure. No TypeScript support, no monorepo integration, no file watching improvements. Last released May 2020.
npm install eslint-plugin-json5No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to install and configure the plugin, then lint a JSON5 file with standard rules like no-undef and quotes.
Use 'eslint . --ext json5' or configure overrides in eslintrc for json5 files.
Disable conflicting rules for JSON5 files via overrides or adjust configuration.
Consider alternatives like eslint-plugin-jsonc or directly parse JSON5 with your own scripts.
Ensure no other processor handles .json files with conflicting transformations.
Run 'eslint . --ext json5' or add 'overrides' in eslintrc for '*.json5' files.
Only use this plugin with ESLint; do not try to parse the file as JSON. Ensure the file is treated as .json5 and not .json.
Disable 'no-undef' rule for JSON5 files in overrides, or add dummy globals.