sweepline/eslint-plugin-unused-imports

The "unused-imports/no-unused-vars" configuration in the.eslintrc file fails to run properly

976977577 opened this issue · 1 comments

This is my configuration file
{
"env": {
"browser": true,
"node": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"plugins": ["prettier", "unused-imports"],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"prettier/prettier": "error",
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
],
"no-var": "error",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-case-declarations": "off"
},
"globals": {
"DEV": true,
"WECHAT": true,
"App": true,
"Page": true,
"Component": true,
"Behavior": true,
"wx": true,
"getApp": true,
"getCurrentPages": true,
"console": "writable"
}
}

When I set the first parameter to error, the console Parsing error: Unexpected token "unused-imports/no-unused-vars":[

"error",

{

"vars": "all",

"args": "after-used",

"ignoreRestSiblings": true,

"argsIgnorePattern": "^_"

}

]

So I can only set it to "wran"?

"unused-imports/no-unused-vars":[

"wran",

{

"vars": "all",

"args": "after-used",

"ignoreRestSiblings": true,

"argsIgnorePattern": "^_"

}

]

It sounds like you just have a syntax error? its hard to see when you do not format and code block your config correctly.