Skip to content

Commit 19c680e

Browse files
committed
.eslintrc.json: use jsonc/no-irregular-whitespace
The eslint-plugin-jsonc documentation recommends turning ESLint's own no-irregular-whitespace plugin off for JSON files in favor of its own jsonc/no-irregular-whitespace plugin. See: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
1 parent 9a025f6 commit 19c680e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@
234234
"plugin:jsonc/recommended-with-json5"
235235
],
236236
"rules": {
237-
"no-irregular-whitespace": "error",
237+
// The ESLint core no-irregular-whitespace rule doesn't work well in JSON
238+
// See: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
239+
"no-irregular-whitespace": "off",
240+
"jsonc/no-irregular-whitespace": "error",
238241
"no-trailing-spaces": "error",
239242
"jsonc/comma-dangle": [
240243
"error",

0 commit comments

Comments
 (0)