mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-04 13:42:27 +08:00
修改eslint 中 no-unused-vars未尤大推荐推荐,避免多余,错误的检测
This commit is contained in:
15
.eslintrc.js
15
.eslintrc.js
@@ -38,19 +38,12 @@ module.exports = defineConfig({
|
|||||||
'@typescript-eslint/ban-types': 'off',
|
'@typescript-eslint/ban-types': 'off',
|
||||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||||
'@typescript-eslint/no-unused-vars': [
|
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '.*', args: 'none' }],
|
||||||
'error',
|
|
||||||
{
|
|
||||||
argsIgnorePattern: '^_',
|
|
||||||
varsIgnorePattern: '^_',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'no-unused-vars': [
|
'no-unused-vars': [
|
||||||
'error',
|
'error',
|
||||||
{
|
// we are only using this rule to check for unused arguments since TS
|
||||||
argsIgnorePattern: '^_',
|
// catches unused variables but not args.
|
||||||
varsIgnorePattern: '^_',
|
{ varsIgnorePattern: '.*', args: 'none' },
|
||||||
},
|
|
||||||
],
|
],
|
||||||
'space-before-function-paren': 'off',
|
'space-before-function-paren': 'off',
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user