Closed heohex closed 1 year ago
Hi @heohex, thanks for the issue!
- eslint 5.16.0 - fine ✔️
- eslint 6.8.0 - fine ✔️
- eslint 7.32.0 - broken❌
- eslint 8.31.0 - fine ✔️
The classFields
option was added in v8.0.0, so it is expected behavior that v7.32.0 throws a configuration error because this option did not exist in v7.32.0. To use this option, you'll need ESLint >= 8.0.0.
Before v7, config schema for this rule was incomplete - it used to allow configuring unknown options but they had no effect.
Hi @mdjermanovic, thanks for the reply. Unfortunately, I could not find information about this in the documentation :( Closed.
Environment
Node version: v14.19.0 npm version: 8.19.2 Local ESLint version: 7.32.0 Global ESLint version: - Operating System: Windows 10
What parser are you using?
Default (Espree)
What did you do?
Configuration
``` { "env": { "es2020": true, "browser": true, "node": true, "jquery": true }, "extends": [ "eslint:recommended", ".\/.goja.json", ".\/.webapp.json" ], "plugins": [ ], "rules": { "id-match": [ "error", "^[^а-яА-ЯёЁ]+$", { "properties": true, "classFields": true } ], "indent": [ "warn", 4, { "ignoreComments": true } ], "linebreak-style": [ "warn", "unix" ], "key-spacing": [ "off", { "align": "value" } ], "quotes": [ "off", "double" ], "semi": [ "off", "always" ], "no-mixed-spaces-and-tabs": [ "off", "smart-tabs" ], "no-redeclare": [ "off", "always" ], "no-unused-vars": [ "warn", { "vars": "local", "args": "none", "caughtErrors": "none" } ], "no-empty": [ "off" ], "no-useless-escape": [ "off" ], "no-undef": [ "warn" ], "no-extra-semi": [ "off" ], "no-console": [ "off" ], "no-extra-boolean-cast": [ "off" ], "no-control-regex": [ "off" ], "no-cond-assign": [ "off" ], "no-constant-condition": [ "off" ], "no-delete-var": [ "off" ], "no-fallthrough": [ "off" ], "no-unused-labels": [ "warn" ], "no-unreachable": [ "warn" ], "no-dupe-keys": [ "warn" ], "no-unsafe-negation": [ "warn" ], "no-func-assign": [ "warn" ], "valid-typeof": [ "warn" ], "no-self-compare": "error", "no-self-assign": [ "warn" ], "no-use-before-define": [ "warn", { "functions": false, "classes": false, "variables": false } ], "no-prototype-builtins": [ "off" ] } } ```What did you expect to happen?
Both rules(properties, classFields) in id-match work correctly. If i remove classFields - no errors
What actually happened?
Got error in webstorm
Error: .eslintrc.json: Configuration for rule "id-match" is invalid: Value {"properties":true,"classFields":true,"onlyDeclarations":false,"ignoreDestructuring":false} should NOT have additional properties.
Error: .eslintrc.json: Configuration for rule "id-match" is invalid: Value {"properties":true,"classFields":true,"onlyDeclarations":false,"ignoreDestructuring":false} should NOT have additional properties.
Participation
Additional comments
Test id-match with properties and classFields with: