chore: lint

This commit is contained in:
Anthony Fu
2020-08-12 20:08:06 +08:00
parent 24e025c12d
commit 7dd8ffaed0
9 changed files with 71 additions and 36 deletions

View File

@@ -18,5 +18,8 @@
"dependencies": {
"@antfu/eslint-config-react": "^0.3.1",
"@antfu/eslint-config-vue": "^0.3.1"
},
"devDependencies": {
"eslint": "^7.6.0"
}
}

View File

@@ -26,15 +26,15 @@ module.exports = {
'import/no-unresolved': 'off',
// Common
'semi': [2, 'never'],
'curly': [2, 'multi-or-nest', 'consistent'],
'quotes': ['error', 'single'],
semi: [2, 'never'],
curly: [2, 'multi-or-nest', 'consistent'],
quotes: ['error', 'single'],
'no-unused-vars': 'warn',
'no-param-reassign': 'off',
'array-bracket-spacing': ['error', 'never'],
'brace-style': ['error', 'stroustrup', { 'allowSingleLine': true }],
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'block-spacing': ['error', 'always'],
'camelcase': 'off',
camelcase: 'off',
'comma-spacing': ['error', { before: false, after: true }],
'comma-style': ['error', 'last'],
'comma-dangle': ['error', 'always-multiline'],
@@ -44,7 +44,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',
@@ -82,8 +82,8 @@ module.exports = {
'array-callback-return': 'error',
'block-scoped-var': 'error',
'consistent-return': 'off',
'complexity': ['off', 11],
'eqeqeq': ['error', 'allow-null'],
complexity: ['off', 11],
eqeqeq: ['error', 'allow-null'],
'no-alert': 'warn',
'no-case-declarations': 'error',
'no-multi-spaces': 'error',

View File

@@ -1,12 +1,12 @@
module.exports = {
extends: [
"plugin:react/recommended",
'plugin:react/recommended',
'@antfu/eslint-config-ts',
],
"rules": {
"jsx-quotes": [
"error",
"prefer-double"
]
}
rules: {
'jsx-quotes': [
'error',
'prefer-double',
],
},
}

View File

@@ -24,6 +24,7 @@
},
"devDependencies": {
"eslint": "^7.6.0",
"react": "^16.13.1",
"typescript": "^3.9.7"
}
}

View File

@@ -29,5 +29,5 @@ module.exports = {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-types': 'off',
}
},
}

View File

@@ -20,5 +20,8 @@
"@antfu/eslint-config-basic": "^0.3.0",
"@typescript-eslint/eslint-plugin": "3.6.1",
"@typescript-eslint/parser": "^3.9.0"
},
"devDependencies": {
"eslint": "^7.6.0"
}
}

View File

@@ -18,5 +18,8 @@
"dependencies": {
"@antfu/eslint-config-ts": "^0.3.1",
"eslint-plugin-vue": "7.0.0-alpha.10"
},
"devDependencies": {
"eslint": "^7.6.0"
}
}