lint: ignore unused vars with _ prefix
This commit is contained in:
parent
b012b95e71
commit
860a3d210d
1 changed files with 14 additions and 1 deletions
|
@ -26,5 +26,18 @@ module.exports = {
|
||||||
parser: '@typescript-eslint/parser'
|
parser: '@typescript-eslint/parser'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
// note you must disable the base rule
|
||||||
|
// as it can report incorrect errors
|
||||||
|
'no-unused-vars': 'off',
|
||||||
|
'@typescript-eslint/no-unused-vars': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
argsIgnorePattern: '^_',
|
||||||
|
varsIgnorePattern: '^_',
|
||||||
|
caughtErrorsIgnorePattern: '^_'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue