-
Notifications
You must be signed in to change notification settings - Fork 96
/
.eslintrc.cjs
57 lines (57 loc) · 1.7 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'google',
'plugin:json/recommended',
],
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"import/resolver": {
// This with eslint-import-resolver-typescript allow use '.js' suffix in exports to allow ESM work also in browser
"typescript": {
"alwaysTryTypes": true,
},
}
},
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2018,
sourceType: 'module',
},
rules: {
'import/no-cycle': ['error', { maxDepth: 1 }],
'import/namespace': 0,
'max-len': 0,
'no-multiple-empty-lines':['error', {'max':1, 'maxEOF':0, 'maxBOF':0}],
'require-jsdoc': [0],
'semi': ['error', 'always'],
'padded-blocks': ['error', 'always'],
'no-console': 'error',
'no-debugger': 'error',
'indent': [
'error', 2, {
'ArrayExpression': 'first',
'FunctionExpression': {'body': 1, 'parameters': 'first'},
'ObjectExpression': 'first',
'SwitchCase': 1,
'CallExpression': {'arguments': 'first'},
},
],
'padding-line-between-statements': [
'error',
{'blankLine': 'any', 'prev': ['const', 'let', 'var'], 'next': ['const', 'let', 'var']},
{'blankLine': 'always', 'prev': '*', 'next': 'class'},
{'blankLine': 'always', 'prev': '*', 'next': 'function'},
{'blankLine': 'always', 'prev': 'block-like', 'next': '*'},
{'blankLine': 'always', 'prev': '*', 'next': 'block-like'},
],
'new-cap': 'off'
},
};