2020-09-24 05:31:06 +08:00
|
|
|
module.exports = {
|
|
|
|
parserOptions: {
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
sourceType: 'module',
|
|
|
|
},
|
|
|
|
env: {
|
|
|
|
es6: true,
|
|
|
|
node: true,
|
|
|
|
},
|
2020-09-24 15:35:18 +08:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: [
|
|
|
|
'./**/*.ts',
|
2021-03-17 05:22:13 +08:00
|
|
|
'./**/*.tsx',
|
2020-09-24 15:35:18 +08:00
|
|
|
'./**/*.js',
|
2021-03-17 05:22:13 +08:00
|
|
|
'./**/*.jsx',
|
2020-09-24 15:35:18 +08:00
|
|
|
'./**/*.vue',
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
'html',
|
|
|
|
'cypress',
|
|
|
|
'@typescript-eslint',
|
|
|
|
],
|
|
|
|
env: {
|
|
|
|
'cypress/globals': true,
|
2020-09-24 05:31:06 +08:00
|
|
|
},
|
2020-09-24 15:35:18 +08:00
|
|
|
globals: {
|
|
|
|
document: false,
|
|
|
|
window: false,
|
|
|
|
},
|
|
|
|
extends: [
|
2021-03-17 05:22:13 +08:00
|
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
2020-09-25 19:52:17 +08:00
|
|
|
'plugin:@typescript-eslint/recommended',
|
2021-10-22 14:52:54 +08:00
|
|
|
'plugin:vue/vue3-strongly-recommended',
|
2020-09-24 15:35:18 +08:00
|
|
|
'airbnb-base',
|
|
|
|
],
|
|
|
|
rules: {
|
2021-12-01 22:40:50 +08:00
|
|
|
curly: ['error', 'all'],
|
2021-12-03 07:03:39 +08:00
|
|
|
'newline-after-var': ['error', 'always'],
|
2021-07-26 21:36:12 +08:00
|
|
|
'no-continue': 'off',
|
2020-09-25 20:17:53 +08:00
|
|
|
'no-alert': 'off',
|
2020-11-18 04:27:25 +08:00
|
|
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
2020-09-24 15:35:18 +08:00
|
|
|
semi: ['error', 'never'],
|
2021-04-14 16:04:30 +08:00
|
|
|
'import/order': 'off',
|
2020-09-24 15:35:18 +08:00
|
|
|
'import/extensions': 'off',
|
|
|
|
'import/no-extraneous-dependencies': 'off',
|
|
|
|
'import/no-unresolved': 'off',
|
|
|
|
'import/no-dynamic-require': 'off',
|
|
|
|
'arrow-parens': ['error', 'as-needed'],
|
|
|
|
'padded-blocks': 'off',
|
|
|
|
'class-methods-use-this': 'off',
|
|
|
|
'global-require': 'off',
|
|
|
|
'func-names': ['error', 'never'],
|
|
|
|
'arrow-body-style': 'off',
|
|
|
|
'max-len': 'off',
|
2021-11-12 16:24:27 +08:00
|
|
|
'no-return-assign': 'off',
|
2020-11-24 17:51:57 +08:00
|
|
|
'vue/one-component-per-file': 'off',
|
2020-09-24 15:35:18 +08:00
|
|
|
'vue/this-in-template': ['error', 'never'],
|
2021-11-05 20:09:09 +08:00
|
|
|
'vue/multi-word-component-names': 'off',
|
2020-09-24 15:35:18 +08:00
|
|
|
'vue/max-attributes-per-line': ['error', {
|
2021-11-05 20:09:09 +08:00
|
|
|
singleline: {
|
|
|
|
max: 3,
|
|
|
|
},
|
2020-09-24 15:35:18 +08:00
|
|
|
multiline: {
|
|
|
|
max: 1,
|
|
|
|
},
|
|
|
|
}],
|
2021-02-05 19:49:08 +08:00
|
|
|
'vue/singleline-html-element-content-newline': 'off',
|
2020-09-24 15:35:18 +08:00
|
|
|
'no-param-reassign': 'off',
|
|
|
|
'import/prefer-default-export': 'off',
|
|
|
|
'consistent-return': 'off',
|
2021-02-22 17:40:56 +08:00
|
|
|
'prefer-destructuring': 'off',
|
2020-10-21 21:17:05 +08:00
|
|
|
'no-redeclare': 'off',
|
|
|
|
'@typescript-eslint/no-redeclare': ['error'],
|
2020-09-24 15:35:18 +08:00
|
|
|
'no-unused-vars': 'off',
|
2021-05-28 21:16:33 +08:00
|
|
|
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
|
2020-09-24 15:35:18 +08:00
|
|
|
'no-use-before-define': 'off',
|
|
|
|
'@typescript-eslint/no-use-before-define': ['error'],
|
2020-11-21 05:04:46 +08:00
|
|
|
'no-dupe-class-members': 'off',
|
|
|
|
'@typescript-eslint/no-dupe-class-members': ['error'],
|
2020-11-30 07:04:30 +08:00
|
|
|
'lines-between-class-members': 'off',
|
2021-02-10 16:59:35 +08:00
|
|
|
'no-shadow': 'off',
|
|
|
|
'@typescript-eslint/no-shadow': ['error'],
|
2020-11-30 07:04:30 +08:00
|
|
|
'@typescript-eslint/lines-between-class-members': ['error'],
|
2020-09-25 19:52:17 +08:00
|
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
|
|
'@typescript-eslint/no-empty-interface': 'off',
|
|
|
|
'@typescript-eslint/explicit-module-boundary-type': 'off',
|
|
|
|
'@typescript-eslint/no-var-requires': 'off',
|
|
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
|
|
'@typescript-eslint/ban-types': 'off',
|
|
|
|
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
|
2020-09-25 19:56:31 +08:00
|
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
2020-09-24 15:35:18 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2020-09-24 05:31:06 +08:00
|
|
|
}
|