Skip to content

Commit

Permalink
feat: no unused disable
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 13, 2021
1 parent 3f7f753 commit 5678d9f
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 21 deletions.
9 changes: 7 additions & 2 deletions packages/basic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion packages/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions packages/react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ module.exports = {
'plugin:react/recommended',
'@antfu/eslint-config-ts',
],
settings: {
react: {
version: 'detect',
},
},
rules: {
'jsx-quotes': [
'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand Down
1 change: 1 addition & 0 deletions packages/vue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ module.exports = {
],
rules: {
'vue/max-attributes-per-line': ['warn', { singleline: 5 }],
'vue/html-self-closing': 'off'
},
}

0 comments on commit 5678d9f

Please sign in to comment.