Skip to content

Commit 4c1220d

Browse files
alanorthgithub-actions[bot]
authored andcommitted
.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 (cherry picked from commit 5e8571d)
1 parent 8eb98ce commit 4c1220d

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
@@ -305,7 +305,10 @@
305305
"plugin:jsonc/recommended-with-json5"
306306
],
307307
"rules": {
308-
"no-irregular-whitespace": "error",
308+
// The ESLint core no-irregular-whitespace rule doesn't work well in JSON
309+
// See: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
310+
"no-irregular-whitespace": "off",
311+
"jsonc/no-irregular-whitespace": "error",
309312
"no-trailing-spaces": "error",
310313
"jsonc/comma-dangle": [
311314
"error",

0 commit comments

Comments
 (0)