mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
chore(web): add ignore pattern to eslint for the unused-vars rule (#965)
* allow eslint ununsed vars and params if starts with _ * comment rests of unused code on Irc.tsx * fix some eslint warn about unused code
This commit is contained in:
parent
32ffc875b0
commit
a5e05284d0
4 changed files with 57 additions and 44 deletions
|
@ -22,6 +22,13 @@ module.exports = {
|
|||
indent: ["warn", 2],
|
||||
// Don't enforce any particular brace style
|
||||
curly: "off",
|
||||
// Allow only vars starting with _ to be ununsed vars
|
||||
"no-unused-vars": ["warn", {
|
||||
"varsIgnorePattern": "^_",
|
||||
"argsIgnorePattern": "^_",
|
||||
"caughtErrorsIgnorePattern": "^_",
|
||||
"ignoreRestSiblings": true
|
||||
}],
|
||||
// Let's keep these off for now and
|
||||
// maybe turn these back on sometime in the future
|
||||
"import/prefer-default-export": "off",
|
||||
|
@ -57,7 +64,6 @@ module.exports = {
|
|||
"@typescript-eslint/quotes": ["error", "double"],
|
||||
semi: "off",
|
||||
"@typescript-eslint/semi": ["warn", "always"],
|
||||
// indent: "off",
|
||||
indent: ["warn", 2],
|
||||
"@typescript-eslint/indent": "off",
|
||||
"@typescript-eslint/comma-dangle": "warn",
|
||||
|
@ -65,6 +71,13 @@ module.exports = {
|
|||
"@typescript-eslint/keyword-spacing": ["error"],
|
||||
"object-curly-spacing": "off",
|
||||
"@typescript-eslint/object-curly-spacing": ["warn", "always"],
|
||||
// Allow only vars starting with _ to be ununsed vars
|
||||
"@typescript-eslint/no-unused-vars": ["warn", {
|
||||
"varsIgnorePattern": "^_",
|
||||
"argsIgnorePattern": "^_",
|
||||
"caughtErrorsIgnorePattern": "^_",
|
||||
"ignoreRestSiblings": true
|
||||
}],
|
||||
// We have quite some "Unexpected any. Specify a different type" warnings.
|
||||
// This disables these warnings since they are false positives afaict.
|
||||
"@typescript-eslint/no-explicit-any": "off"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue