{"id":22496452,"url":"https://github.com/zeitport/eslint-plugin-json-es","last_synced_at":"2025-08-03T11:07:31.353Z","repository":{"id":42664785,"uuid":"294713410","full_name":"zeitport/eslint-plugin-json-es","owner":"zeitport","description":"A ESLint plugin to lint JSON files with existing or custom rules.","archived":false,"fork":false,"pushed_at":"2024-06-16T14:00:46.000Z","size":767,"stargazers_count":11,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-06T04:34:41.657Z","etag":null,"topics":["eslint","eslint-plugin","json","json-parser","linter","linting"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeitport.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-11T14:12:22.000Z","updated_at":"2024-08-15T05:51:57.000Z","dependencies_parsed_at":"2024-10-25T02:36:53.139Z","dependency_job_id":"214c8cc7-55df-4e66-b60a-4aebfd33d991","html_url":"https://github.com/zeitport/eslint-plugin-json-es","commit_stats":{"total_commits":128,"total_committers":4,"mean_commits":32.0,"dds":0.125,"last_synced_commit":"9a5c3f3d1289d24ee2d4416cd84f0c96417dee69"},"previous_names":["zeitport/eslint-plugin-json","zeitport/eslint-parser-json"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeitport%2Feslint-plugin-json-es","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeitport%2Feslint-plugin-json-es/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeitport%2Feslint-plugin-json-es/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeitport%2Feslint-plugin-json-es/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeitport","download_url":"https://codeload.github.com/zeitport/eslint-plugin-json-es/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230045713,"owners_count":18164341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","eslint-plugin","json","json-parser","linter","linting"],"created_at":"2024-12-06T20:12:28.787Z","updated_at":"2024-12-19T20:08:23.144Z","avatar_url":"https://github.com/zeitport.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://img.shields.io/npm/v/eslint-plugin-json-es.svg)](https://www.npmjs.com/package/eslint-plugin-json-es)\n[![CI status](https://github.com/zeitport/eslint-plugin-json-es/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/zeitport/eslint-plugin-json-es/actions?query=workflow%3ACI)\n[![Downloads](https://img.shields.io/npm/dm/eslint-plugin-json-es.svg)](https://www.npmjs.com/package/eslint-plugin-json-es)\n![NPM](https://img.shields.io/npm/l/eslint-plugin-json-es)\n\n# eslint-plugin-json-es\n\nA JSON parser for [ESLint] that works with a lot of existing ESLint rules or your custom rules.\n\n## Installation\n\n```\nnpm install eslint-plugin-json-es --save-dev\n```\n\n## Configure ESLint\n\nThis is an example [ESLint] configuration for all *.json files.\nIt _extends_ the recommended rules for JSON.\n\n```json\n{\n    \"overrides\": [{\n        \"files\": [\"*.json\"],\n        \"parser\": \"eslint-plugin-json-es\",\n        \"extends\": \"plugin:eslint-plugin-json-es/recommended\",\n        \"rules\": {\n        }\n    }]\n}\n```\n\n## Examples\nSee the [example branch] for different use cases and [ESLint] configurations.\n\n## Alternative JSON Plugins\n\nThere are three different ways how to add JSON linting to [ESLint].\nSelect the package that fits your needs:\n\n|                           | [eslint-plugin-json-es](https://www.npmjs.com/package/eslint-plugin-json-es) | [eslint-plugin-json](https://www.npmjs.com/package/eslint-plugin-json) | [eslint-plugin-jsonc](https://www.npmjs.com/package/eslint-plugin-jsonc)       |\n| ---                       | ----------------------------- | ------------------------- | ------------------------- |\n| Version                   | ![NPM version](https://img.shields.io/npm/v/eslint-plugin-json-es.svg) | ![NPM version](https://img.shields.io/npm/v/eslint-plugin-json.svg) | ![NPM version](https://img.shields.io/npm/v/eslint-plugin-jsonc.svg)         |\n| Engine                    | ESLint espree parser          | VSCode JSON Validation    | Custom AST parser         |\n| ESLint version            | \u003e7.0.0                        | ?                         | \u003e6.0.0                    |\n| Custom rules              | ✔                             | ❌                        | ✔ (1)                     |\n| Use existing ESLint rules | ✔ (2)                         | ❌                        | ❌                         |\n| Fix Code                  | ✔                             | ❌                        | ✔ (partly)                |\n| Rule compare guide        | -                             | [Compare](docs/compare-eslint-plugin-json.md) | #TODO :-(    |\n\n_(1) Uses custom AST node types_\u003cbr\u003e\n_(2) Not every ESLint rule makes sense for JSON_\u003cbr\u003e\n\n## Rules Configurations\n\n### Recommended\n[./config/recommended.js](./config/recommended.js)\n\n| Auto-fix | Rule                   | Version       |\n|----------|----------------------------| ----------|\n|🔧| comma-dangle                        | \u003e 1.3.0   |\n| | no-dupe-keys                        | \u003e 1.3.0   |\n|🔧| no-extra-parens                     | \u003e 1.4.0  |\n| | no-irregular-whitespace             | \u003e 1.3.0   |\n| | no-loss-of-precision                | \u003e 1.3.0   |\n| | no-undefined                        | \u003e 1.3.0   |\n|🔧| quotes                              | \u003e 1.3.0   |\n|🔧| quote-props                         | \u003e 1.3.0   |\n\n### Readable\nBased on the recommended rules with stylistic aspects.\n\n[./config/style.js](./config/style.js)\n\n| Auto-fix | Rule                   | Comment |\n|----------|------------------------|---------------------|\n|🔧| indent | 4 |\n|🔧| no-multiple-empty-lines | |\n| | sort-keys |Alternative with fix [eslint-plugin-sort-keys-fix] |\n\n## Optional Rules\nA list of optional rules that can be added to your configuration.\n\n### `json-es/use-camelcase`\nThe \"original\" ESLint camelcase rule does not work with JSON files.\n\nA custom 'use-camelcase' [rule](./rules/use-camelcase.js) is available.\nBased on the ESLint camelcase rule with minor adjustments.\n\n__Configuration__\n```json\n{\n    \"rules\": {\n        \"json-es/use-camelcase\": [\"error\", {\"allow\": [\"FOO\", \"[regex]*\"]}]\n    }\n}\n```\n\n[ESLint]: https://eslint.org/\n[custom parser]: https://eslint.org/docs/developer-guide/working-with-custom-parsers\n[eslint-plugin-json]: https://github.com/azeemba/eslint-plugin-json\n[eslint-plugin-jsonc]: https://github.com/ota-meshi/eslint-plugin-jsonc\n[eslint-plugin-sort-keys-fix]: https://github.com/leo-buneev/eslint-plugin-sort-keys-fix\n[example branch]: https://github.com/zeitport/eslint-plugin-json/tree/example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeitport%2Feslint-plugin-json-es","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeitport%2Feslint-plugin-json-es","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeitport%2Feslint-plugin-json-es/lists"}