-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
144 lines (142 loc) · 3.17 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
const alias = require('./importAliases');
const unusedVarsIgnorePattern = '^_[0-9]+$';
module.exports = {
settings: {
'import/resolver': {
'babel-module': {
extensions: ['.js', '.ts'],
alias
}
}
},
env: {
browser: true,
node: true,
es6: true,
'jest/globals': true
},
root: true,
plugins: ['@typescript-eslint', 'jest', 'module-resolver'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'plugin:import/errors',
'plugin:import/warnings'
],
globals: {
Atomics: 'readonly'
},
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module'
},
rules: {
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
'no-multiple-empty-lines': ['error', { max: 1 }],
'no-case-declarations': 0,
'no-return-await': 'error',
'import/no-unresolved': 0,
'import/order': [
'error',
{
'newlines-between': 'never',
alphabetize: {
order: 'asc',
caseInsensitive: true
}
}
],
semi: ['error', 'always'],
quotes: ['error', 'single', { avoidEscape: true }],
curly: ['error', 'multi-or-nest', 'consistent'],
'linebreak-style': ['error', 'unix'],
'no-duplicate-imports': [
'error',
{
includeExports: true
}
],
'rest-spread-spacing': ['error', 'never'],
'no-inline-comments': [
'error',
{
ignorePattern: '_prettier-hack'
}
],
'prefer-spread': ['error'],
'prefer-const': 'error',
'no-useless-call': ['error'],
'no-trailing-spaces': ['error'],
'space-before-blocks': ['error', 'always'],
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: unusedVarsIgnorePattern,
argsIgnorePattern: unusedVarsIgnorePattern,
caughtErrorsIgnorePattern: unusedVarsIgnorePattern
}
],
'no-floating-decimal': ['error'],
'comma-dangle': ['error', 'never'],
'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'switch-colon-spacing': [
'error',
{
after: true,
before: false
}
],
'space-unary-ops': [
'error',
{
words: true,
nonwords: false
}
],
'space-before-function-paren': [
'error',
{
anonymous: 'always',
named: 'always',
asyncArrow: 'always'
}
],
'keyword-spacing': [
'error',
{
before: true,
after: true
}
],
'space-in-parens': ['error', 'never'],
'block-spacing': 'error',
'key-spacing': [
'error',
{
singleLine: {
beforeColon: false,
afterColon: true,
mode: 'strict'
},
multiLine: {
beforeColon: false,
afterColon: true,
mode: 'strict'
}
}
],
'generator-star-spacing': [
'error',
{
before: false,
after: true
}
],
eqeqeq: 'error',
'no-empty': 'error',
'@typescript-eslint/no-var-requires': 0,
'no-constant-condition': 0
}
};