-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
75 lines (74 loc) · 2.26 KB
/
.eslintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
'extends': [
'airbnb-typescript/base',
'eslint:recommended',
'plugin:import/recommended',
'plugin:vue/vue3-essential',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
project: ['./tsconfig.json', './tsconfig.app.json', './tsconfig.node.json']
},
settings: {
'import/resolver': {
typescript: {
project: ['./tsconfig.json', './tsconfig.app.json', './tsconfig.node.json']
}
},
},
ignorePatterns: ['.eslintrc.cjs', '.prettierrc.cjs', 'dist/*'],
rules: {
'prettier/prettier': ['warn'],
'import/no-extraneous-dependencies': ['error', { devDependencies: false }],
'import/no-cycle': ['error'],
'no-void': ['error', { allowAsStatement: true }],
'no-console': ['warn'],
'max-classes-per-file': ['error', 1],
'class-methods-use-this': 'off',
'no-param-reassign': 'warn',
'no-underscore-dangle': 'error',
'@typescript-eslint/no-inferrable-types': ['off'],
'@typescript-eslint/typedef': [
'warn',
{
arrayDestructuring: true,
arrowParameter: true,
memberVariableDeclaration: true,
objectDestructuring: true,
parameter: true,
propertyDeclaration: true,
variableDeclaration: true,
variableDeclarationIgnoreFunction: true
}
],
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_.+' }],
"@typescript-eslint/no-unnecessary-condition": "error",
'@typescript-eslint/no-empty-interface': [
'error',
{
allowSingleExtends: true
}
]
},
overrides: [
{
files: [
'**/*.spec.ts', './vitest.setup.ts', './vite.config.ts', './src/specs/**'
],
rules: {
'import/no-extraneous-dependencies': ['error', {devDependencies: true}],
}
}
],
}