-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc.yml
114 lines (105 loc) · 3.44 KB
/
.eslintrc.yml
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
env:
browser: true
node: true
extends:
- "eslint:recommended"
- "plugin:@typescript-eslint/eslint-recommended"
- "plugin:@typescript-eslint/recommended"
- "plugin:@typescript-eslint/recommended-requiring-type-checking"
plugins:
- "@typescript-eslint"
parser: "@typescript-eslint/parser"
parserOptions:
ecmaVersion: 6
sourceType: 'module'
project: './tsconfig.json'
ignorePatterns:
- "**/esm/*"
- "**/tmp/*"
- "**/tests-tmp/*"
- "**/lib/*"
- "**/dist/*"
- "**/playground"
rules:
# Possible errors
for-direction: [error]
getter-return: [error]
no-await-in-loop: [error]
no-extra-parens: [error, all, {conditionalAssign: false}]
no-template-curly-in-string: [error]
# Best practice
array-callback-return: [error]
no-eq-null: [error]
no-extend-native: [error]
no-extra-label: [error]
no-floating-decimal: [error]
no-implicit-coercion: [error, {allow: ["!!"]}]
no-multi-spaces: [error]
no-multi-str: [error]
no-new-wrappers: [error]
no-return-assign: [error]
no-return-await: [error]
no-script-url: [error]
no-self-compare: [error]
no-unmodified-loop-condition: [error]
no-unused-expressions: [error]
no-useless-concat: [error]
no-void: [error]
no-warning-comments: [warn]
no-with: [error]
yoda: [error]
no-console: [error, { "allow": ["warn", "error"] }]
# Variables
no-catch-shadow: [error]
no-shadow-restricted-names: [error]
no-undef-init: [error]
# Stylistic issues
array-bracket-spacing: [error]
camelcase: [error, {properties: never}]
comma-dangle: [error]
comma-spacing: [error]
comma-style: [error]
eol-last: [error]
func-call-spacing: [error]
func-name-matching: [error]
indent: [error, tab]
key-spacing: [error, {beforeColon: false, afterColon: true}]
keyword-spacing: [error]
linebreak-style: [error, unix]
line-comment-position: [error, {position: above, applyDefaultIgnorePatterns: false}]
lines-around-comment: [warn, {beforeBlockComment: true}]
max-depth: [error]
max-len: [error, 120, {ignoreTemplateLiterals: true, ignoreRegExpLiterals: true, ignoreUrls: true}]
max-nested-callbacks: [error, 4]
new-cap: [error]
no-array-constructor: [error]
no-bitwise: [error]
no-lonely-if: [error]
no-multi-assign: [error]
no-multiple-empty-lines: [error, {max: 2}]
no-negated-condition: [error]
no-nested-ternary: [error]
no-new-object: [error]
no-trailing-spaces: [error]
no-unneeded-ternary: [error]
no-whitespace-before-property: [error]
one-var-declaration-per-line: [error]
operator-assignment: [error]
operator-linebreak: [error, before, overrides: { "?": ignore, ":": ignore, "=": after}]
quote-props: [error, as-needed]
quotes: [error, single, { allowTemplateLiterals: true }]
semi: [error, always]
semi-spacing: [error, {before: false, after: true}]
space-before-blocks: [error]
space-before-function-paren: [error, {named: never}]
spaced-comment: [error]
switch-colon-spacing: [error]
unicode-bom: [error]
wrap-regex: [error]
# Typescript
'@typescript-eslint/no-explicit-any': off
'@typescript-eslint/no-unsafe-argument': [warn]
'@typescript-eslint/no-unsafe-assignment': off
'@typescript-eslint/no-unsafe-member-access': off
'@typescript-eslint/no-var-requires': off
'@typescript-eslint/no-unsafe-call': off