-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
85 lines (73 loc) · 2.13 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
76
77
78
79
80
81
82
83
84
85
// eslint-disable-next-line no-undef
module.exports = {
'env': {
'es6': true
},
'extends': [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly',
'module': 'readonly',
'require': 'readonly'
},
'parserOptions': {
'ecmaVersion': 2021,
'parser': '@typescript-eslint/parser',
'sourceType': 'module'
},
'plugins': [
'@typescript-eslint'
],
'rules': {
'@typescript-eslint/explicit-module-boundary-types': [
//https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
'off'
],
'@typescript-eslint/no-explicit-any': [
'off'
],
'@typescript-eslint/no-inferrable-types': [
//Disables warning when we do something like 'const t: number = 0' where the type can be inferred
'off'
],
'@typescript-eslint/no-unused-vars': [
'error', { varsIgnorePattern: '^_', argsIgnorePattern: '^_', ignoreRestSiblings: true }
],
'@typescript-eslint/no-non-null-assertion': [
'off'
],
'max-lines': [
//I've never used this before but like the idea of it. Lets see how restrictive or helpful it is and then discuss it. Since vue files have html and code, I could easily see this being too restrictive
//Actually, I think this might only look at .ts files base on vue having their own max-len (line length). Lets just see how it goes
'error',
{
'max': 500
}
],
'complexity': [
//https://eslint.org/docs/rules/complexity
'error'
],
'indent': [
//Turning off because I'm not sure how to get it to require initial indent in vue scripts
'off',
3
],
'max-depth': [
'error',
3
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
]
}
};