-
Notifications
You must be signed in to change notification settings - Fork 16
/
.eslintrc.js
59 lines (59 loc) · 2.1 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
module.exports = {
root: true,
env: {
node: true
},
plugins: ['testing-library', 'jest-dom'],
'extends': [
'plugin:vue/essential',
'@vue/standard',
'@vue/typescript/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:testing-library/vue',
'plugin:jest-dom/recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
quotes: 'off',
'@typescript-eslint/quotes': ['error', 'single'],
'@typescript-eslint/explicit-function-return-type': 'off',
'semi': 'off',
'@typescript-eslint/semi': ['error', 'never'],
'no-unused-expressions': 'off',
'no-use-before-define': 'warn',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'comma', requireLast: false }, singleline: { delimiter: 'comma', requireLast: false }, overrides: { interface: { multiline: { delimiter: 'none' } } } }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/require-await': 'off', // TODO: can remove on 11/25
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/no-floating-promises': 'warn',
'vue/return-in-computed-property': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
extraFileExtensions: ['.vue']
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)'
],
env: {
jest: true
}
}
]
}