在我行走时,仍然把这一规则视为错误。 此前,我已制定了<条码>无使用-瓦尔<>/代码>和<条码>@打字-eslint/no-unuse-vars,以便在文件上发出警告。
我曾尝试过<条码>“无使用-惯例”: 1和-no-un used-vars”:“warn”
,但无效果。
Why is eslint ignoring my rule settings?
eslintrc案
{
"root": true,
"env": {
"node": false,
"browser": true
},
"globals": {
"google": true,
"process": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": "latest",
"requireConfigFile": false
},
"overrides": [
{
"files": ["*.{ts,tsx}"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["plugin:@typescript-eslint/recommended"] // needed for ts
}
],
"rules": {
"@typescript-eslint/no-unused-vars": 1, // < ----- this wont set it to a warning
"no-unused-vars": 1, // < ----- this wont set it to a warning, still error
}
}