-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
135 lines (135 loc) · 3.98 KB
/
.eslintrc
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
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"unused-imports",
"promise",
"simple-import-sort",
"prettier",
"import",
"node",
"security",
"sort-exports"
],
"overrides": [
{
"files": ["*.js", "*.jsx", "*.ts", "*.tsx"]
}
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"sort-exports/sort-exports": [
"error",
{
"sortDir": "asc",
"sortExportKindFirst": "type",
"pattern": "**/src/index.ts"
}
],
"no-constructor-return": "error",
"no-new-native-nonconstructor": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-unmodified-loop-condition": "warn",
"no-unreachable-loop": "error",
"accessor-pairs": "error",
"block-scoped-var": "error",
"class-methods-use-this": "error",
"consistent-this": "error",
"default-case": "error",
"default-case-last": "error",
"default-param-last": "error",
"dot-notation": "error",
"eqeqeq": ["warn", "always", { "null": "ignore" }],
"grouped-accessor-pairs": "error",
"guard-for-in": "warn",
"no-array-constructor": "error",
"no-caller": "error",
"no-else-return": "error",
"no-empty": "error",
"no-empty-static-block": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-extra-label": "error",
"no-implicit-coercion": "warn",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-label-var": "error",
"no-lonely-if": "error",
"no-loop-func": "warn",
"no-nested-ternary": "warn",
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-proto": "error",
"no-regex-spaces": "error",
"no-script-url": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unneeded-ternary": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-useless-return": "error",
"no-useless-rename": "error",
"no-var": "error",
"no-void": "error",
"no-with": "error",
"prefer-named-capture-group": "error",
"prefer-object-has-own": "error",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"radix": "error",
"require-yield": "error",
"sort-vars": "error",
"symbol-description": "error",
"vars-on-top": "error",
"yoda": "error",
"no-console": 1,
"prettier/prettier": 2,
"no-constant-binary-expression": "warn",
"no-unused-vars": "off", // or "@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/ban-ts-comment": "off",
"unused-imports/no-unused-imports": "error",
"simple-import-sort/imports": "error",
"promise/always-return": ["warn", { "ignoreLastCallback": true }],
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/no-native": "off",
"promise/no-nesting": "warn",
"promise/no-promise-in-callback": "warn",
"promise/no-callback-in-promise": "warn",
"promise/avoid-new": "off",
"promise/no-new-statics": "error",
"promise/no-return-in-finally": "warn",
"promise/valid-params": "warn"
}
}