Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/rules/no-duplicate-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ import { getKey, getRawKey } from "../util.js";
const rule = {
meta: {
type: "problem",
languages: ["json/json", "json/jsonc", "json/json5"],

docs: {
recommended: true,
description: "Disallow duplicate keys in JSON objects",
dialects: ["JSON", "JSONC", "JSON5"],
url: "https://github.com/eslint/json/tree/main/docs/rules/no-duplicate-keys.md",
},

Expand Down
2 changes: 2 additions & 0 deletions src/rules/no-empty-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ import { getKey } from "../util.js";
const rule = {
meta: {
type: "problem",
languages: ["json/json", "json/jsonc", "json/json5"],

docs: {
recommended: true,
description: "Disallow empty keys in JSON objects",
dialects: ["JSON", "JSONC", "JSON5"],
url: "https://github.com/eslint/json/tree/main/docs/rules/no-empty-keys.md",
},

Expand Down
2 changes: 2 additions & 0 deletions src/rules/no-unnormalized-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ import { getKey, getRawKey } from "../util.js";
const rule = {
meta: {
type: "problem",
languages: ["json/json", "json/jsonc", "json/json5"],

fixable: "code",

docs: {
recommended: true,
description: "Disallow JSON keys that are not normalized",
dialects: ["JSON", "JSONC", "JSON5"],
url: "https://github.com/eslint/json/tree/main/docs/rules/no-unnormalized-keys.md",
},

Expand Down
2 changes: 2 additions & 0 deletions src/rules/no-unsafe-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ const NON_ZERO = /[1-9]/u;
const rule = {
meta: {
type: "problem",
languages: ["json/json", "json/jsonc", "json/json5"],

docs: {
recommended: true,
description: "Disallow JSON values that are unsafe for interchange",
dialects: ["JSON", "JSONC", "JSON5"],
url: "https://github.com/eslint/json/tree/main/docs/rules/no-unsafe-values.md",
},

Expand Down
2 changes: 2 additions & 0 deletions src/rules/sort-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const comparators = {
const rule = {
meta: {
type: "suggestion",
languages: ["json/json", "json/jsonc", "json/json5"],

fixable: "code",

Expand All @@ -95,6 +96,7 @@ const rule = {
docs: {
recommended: false,
description: `Require JSON object keys to be sorted`,
dialects: ["JSON", "JSONC", "JSON5"],
url: "https://github.com/eslint/json/tree/main/docs/rules/sort-keys.md",
},

Expand Down
2 changes: 2 additions & 0 deletions src/rules/top-level-interop.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
const rule = {
meta: {
type: "problem",
languages: ["json/json", "json/jsonc", "json/json5"],

docs: {
recommended: false,
description:
"Require the JSON top-level value to be an array or object",
dialects: ["JSON", "JSONC", "JSON5"],
url: "https://github.com/eslint/json/tree/main/docs/rules/top-level-interop.md",
},

Expand Down
Loading