-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
111 lines (111 loc) · 3.34 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
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'simple-import-sort',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
ignorePatterns: [
'/lib/',
'/out/',
],
rules: {
'@typescript-eslint/array-type': [
'error',
{default: 'array', readonly: 'generic'},
],
'@typescript-eslint/consistent-type-assertions': [
'error',
{assertionStyle: 'as', objectLiteralTypeAssertions: 'never'},
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/quotes': ['error', 'single'],
'@typescript-eslint/semi': 'error',
'@typescript-eslint/unified-signatures': 'error',
'array-bracket-spacing': 'error',
'arrow-parens': 'error',
'consistent-return': 'error',
'curly': 'error',
'default-case-last': 'error',
'default-param-last': 'error',
'dot-location': ['error', 'property'],
'dot-notation': 'error',
'eqeqeq': ['error', 'smart'],
'max-len': ['error', {ignoreUrls: true}],
'no-alert': 'error',
'no-caller': 'error',
'no-constructor-return': 'error',
'no-duplicate-imports': 'error',
'no-else-return': 'error',
'no-eq-null': 'error',
'no-eval': 'error',
'no-extra-bind': 'error',
'no-extra-label': 'error',
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
'no-label-var': 'error',
'no-loss-of-precision': 'error',
'no-multi-spaces': 'error',
'no-new-wrappers': 'error',
'no-promise-executor-return': 'error',
'no-restricted-globals': [
// https://github.com/microsoft/TypeScript/issues/18433
'error',
'closed',
'event',
'fdescribe',
'length',
'location',
'name',
'parent',
'top',
],
'no-self-compare': 'error',
'no-sequences': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-unused-expressions': 'error',
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-rename': 'error',
'no-tabs': 'error',
'no-trailing-spaces': 'error',
'no-unneeded-ternary': ['error', {defaultAssignment: false}],
'no-var': 'error',
'no-whitespace-before-property': 'error',
'object-curly-spacing': 'error',
'object-shorthand': ['error', 'always', {avoidQuotes: true}],
'prefer-const': 'error',
'radix': 'error',
'require-await': 'error',
'simple-import-sort/imports': 'error',
},
overrides: [
{
files: ['**/test/**/*.ts'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
],
};