Skip to content

Commit 5e8571d

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 3a05733 commit 5e8571d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,10 @@
306306
"plugin:jsonc/recommended-with-json5"
307307
],
308308
"rules": {
309-
"no-irregular-whitespace": "error",
309+
// The ESLint core no-irregular-whitespace rule doesn't work well in JSON
310+
// See: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
311+
"no-irregular-whitespace": "off",
312+
"jsonc/no-irregular-whitespace": "error",
310313
"no-trailing-spaces": "error",
311314
"jsonc/comma-dangle": [
312315
"error",

0 commit comments

Comments
 (0)