-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.eslintrc.js
63 lines (63 loc) · 2.11 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
module.exports = {
env: {
es6: true,
node: true,
},
extends: [
'eslint:all',
'plugin:@typescript-eslint/all',
'plugin:import/typescript',
'plugin:jest/all',
'plugin:node/recommended',
'plugin:promise/recommended',
'standard-with-typescript',
],
globals: {
Atomics: 'readonly', // eslint-disable-line @typescript-eslint/naming-convention
SharedArrayBuffer: 'readonly', // eslint-disable-line @typescript-eslint/naming-convention
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module',
project: 'tsconfig.eslint.json',
},
plugins: [
'@typescript-eslint',
'import',
'jest',
'node',
'promise',
'standard',
],
rules: {
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/no-magic-numbers': ['off'],
'@typescript-eslint/prefer-readonly-parameter-types': ['off'],
'@typescript-eslint/quotes': ['error', 'single'],
'@typescript-eslint/semi': ['error', 'always'],
'@typescript-eslint/typedef': ['off'],
'array-bracket-newline': ['error', 'consistent'],
'array-element-newline': ['error', 'consistent'],
'comma-dangle': ['error', 'always-multiline'],
'func-style': ['off'],
'function-call-argument-newline': ['error', 'consistent'],
'function-paren-newline': ['error', 'consistent'],
'id-length': ['error', { exceptions: ['r', 'g', 'b', 'x', 'y', '_', 'i'] }],
indent: ['error', 2],
'max-len': ['error', 120],
'max-lines': ['off'],
'max-lines-per-function': ['off'],
'max-params': ['error', { max: 4 }],
'max-statements': ['off'],
'multiline-ternary': ['error', 'always-multiline'],
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 3 }],
'no-constructor-return': ['off'],
'no-ternary': ['off'],
'node/no-missing-import': ['error', { tryExtensions: ['.js', '.ts', '.json', '.node'] }],
'node/no-unsupported-features/es-syntax': ['error', { ignores: ['modules'] }],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'sort-keys': ['error', 'asc', { minKeys: 5, natural: true }],
},
};