-
Notifications
You must be signed in to change notification settings - Fork 31
/
.eslintrc.js
84 lines (82 loc) · 1.99 KB
/
.eslintrc.js
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
76
77
78
79
80
81
82
83
84
module.exports = {
root: true,
ignorePatterns: [
'node_modules',
'dist',
'dist-ssr',
'package-lock.json',
'yarn.lock.json',
'*.local',
],
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:vue/vue3-recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'airbnb-base',
'@vue/typescript/recommended',
],
parser: 'vue-eslint-parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
parser: {
ts: '@typescript-eslint/parser',
},
ecmaVersion: 2018,
ecmaFeatures: {
globalReturn: false,
impliedStrict: false,
jsx: false,
},
},
rules: {
'no-param-reassign': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'consistent-return': 'off',
'no-underscore-dangle': 'off',
'vue/define-emits-declaration': ['error', 'type-based'],
'vue/html-closing-bracket-newline': ['error', {
singleline: 'never',
multiline: 'never',
}],
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: ['const', 'var', 'let'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
],
'max-len': ['warn', { code: 150 }],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
'': 'never',
},
],
'no-useless-constructor': 'off',
'class-methods-use-this': 'off',
},
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: true,
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};