-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
45 lines (44 loc) · 1.23 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
module.exports = {
'env': {
'es2021': true,
'node': true,
},
'extends': [
'eslint:recommended', 'plugin:@typescript-eslint/recommended',
],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 2021,
'sourceType': 'module',
},
'plugins': ['@typescript-eslint'],
'ignorePatterns': ['lib', 'node_modules'],
'rules': {
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error','single'],
'semi': ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],
'space-before-function-paren': ['error', 'never'],
'keyword-spacing': ['error', {
before: true,
after: true,
overrides: {
if: { after: false },
for: { after: false },
},
}],
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
'array-bracket-newline': ['error', 'consistent'],
'array-element-newline': ['error', 'never'],
'template-curly-spacing': ['error', 'never'],
'dot-notation': 'off',
'space-in-parens': ['error', 'never'],
camelcase: 'off',
'no-unused-vars': 'error',
'no-undef': 'off',
//typescript
'@typescript-eslint/no-var-requires': 'off',
},
};