feat: no unused disable

This commit is contained in:
Anthony Fu
2021-03-13 21:09:53 +08:00
parent 3f7f753a5a
commit 5678d9f5c3
6 changed files with 118 additions and 21 deletions

View File

@@ -4,7 +4,12 @@ module.exports = {
browser: true,
node: true,
},
extends: ['standard', 'plugin:import/errors', 'plugin:import/warnings'],
extends: [
'standard',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:eslint-comments/recommended',
],
plugins: ['html', 'unicorn'],
settings: {
'import/resolver': {
@@ -38,7 +43,7 @@ module.exports = {
'no-cond-assign': ['error', 'always'],
'func-call-spacing': ['off', 'never'],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
indent: [ 'error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 } ],
indent: ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
'no-restricted-syntax': [
'error',
'DebuggerStatement',

View File

@@ -28,6 +28,7 @@
"eslint-plugin-unicorn": "^23.0.0"
},
"devDependencies": {
"eslint": "^7.11.0"
"eslint": "^7.11.0",
"eslint-plugin-eslint-comments": "^3.2.0"
}
}

View File

@@ -3,6 +3,11 @@ module.exports = {
'plugin:react/recommended',
'@antfu/eslint-config-ts',
],
settings: {
react: {
version: 'detect',
},
},
rules: {
'jsx-quotes': [
'error',

View File

@@ -16,7 +16,7 @@ module.exports = {
'@typescript-eslint/type-annotation-spacing': ['error', {}],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [2, { args: 'none', ignoreRestSiblings: true }],
'@typescript-eslint/no-unused-vars': 'off',
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': 'error',

View File

@@ -12,5 +12,6 @@ module.exports = {
],
rules: {
'vue/max-attributes-per-line': ['warn', { singleline: 5 }],
'vue/html-self-closing': 'off'
},
}