-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.json
156 lines (156 loc) · 5.7 KB
/
.eslintrc.json
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint/eslint-plugin"
],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"root": true,
"env": {
"node": true,
"jest": true
},
"ignorePatterns": [
"test/**/*"
],
"rules": {
"max-len": [
"error",
{
"code": 120,
"comments": 120,
"tabWidth": 2,
"ignoreUrls": true,
"ignoreStrings": true,
"ignorePattern": "import",
"ignoreTemplateLiterals": true,
"ignoreTrailingComments": true
}
],
"no-underscore-dangle": [
"warn",
{
"allow": [
"_channel",
"_object",
"_number",
"_instance",
"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"
]
}
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"indent": ["warn", 2, {"SwitchCase": 1}],
"no-use-before-define": "off",
"quotes": ["error", "single"],
"react/display-name": ["off"],
"curly": ["warn", "all"],
"eqeqeq": ["warn", "smart"],
"radix": ["warn", "as-needed"],
"space-infix-ops": ["error", {"int32Hint": false}],
"no-console": ["warn", {"allow": ["error", "warn", "info"]}],
"import/no-unresolved": ["off"],
"semi-spacing": ["warn", {"before": false, "after": true}],
"no-fallthrough": ["warn", {"commentPattern": "no-break"}],
"no-extend-native": ["warn", {"exceptions": ["Error", "Array"]}],
"no-multiple-empty-lines": ["warn", {"max": 2, "maxEOF": 1, "maxBOF": 1}],
"no-restricted-globals": ["warn", {"name": "event", "message": "Use local parameter instead."}],
"no-undef-init": ["warn"],
"no-useless-computed-key": ["warn"],
"no-unneeded-ternary": ["warn", {"defaultAssignment": true}],
"no-unsafe-negation": ["warn"],
"no-unused-vars": ["warn", {"vars": "local", "args": "none", "ignoreRestSiblings": true, "varsIgnorePattern": "[iI]gnored"}],
"space-in-parens": ["warn", "never"],
"space-before-function-paren": ["warn", "always"],
"arrow-spacing": ["warn", {"before": true, "after": true}],
"comma-spacing": ["warn", {"before": false, "after": true}],
"generator-star-spacing": ["warn", {"before": true, "after": true}],
"prefer-const": ["warn", {"ignoreReadBeforeAssign": true, "destructuring": "all"}],
"dot-notation": ["warn", {"allowKeywords": true}],
"comma-style": ["warn", "last"],
"no-tabs": ["warn"],
"default-case": ["warn"],
"prefer-spread": ["warn"],
"no-else-return": ["warn"],
"prefer-template": ["warn"],
"no-multi-assign": ["warn"],
"constructor-super": ["warn"],
"no-useless-escape": ["warn"],
"yield-star-spacing": ["warn"],
"max-depth": ["warn", {"max": 5}],
"max-params": ["warn", {"max": 4}],
"dot-location": ["warn", "property"],
"func-call-spacing": ["warn", "never"],
"quote-props": ["warn", "as-needed"],
"block-spacing": ["warn", "always"],
"key-spacing": ["warn", {"afterColon": true}],
"operator-linebreak": ["warn", "before"],
"space-before-blocks": ["warn", "always"],
"rest-spread-spacing": ["warn", "never"],
"object-curly-spacing": ["warn", "always"],
"max-statements-per-line": ["warn", {"max": 2}],
"no-confusing-arrow": ["off", {"allowParens": true}],
"no-multi-spaces": ["warn", {"ignoreEOLComments": true}],
"brace-style": ["warn", "1tbs", {"allowSingleLine": true}],
"keyword-spacing": ["warn", {"before": true, "after": true}],
"class-methods-use-this": ["warn", {"exceptMethods": ["render"]}],
"valid-typeof": ["error", {"requireStringLiterals": true}],
"symbol-description": ["error"],
"eol-last": ["warn", "always"],
"jsx-quotes": ["error", "prefer-double"],
"semi": ["warn", "always"],
"no-spaced-func": ["error"],
"no-unused-labels": ["error"],
"no-undefined": ["error"],
"new-parens": ["error"],
"require-yield": ["error"],
"unicode-bom": ["error"],
"no-floating-decimal": ["error"],
"linebreak-style": ["error", "unix"],
"no-trailing-spaces": ["warn"],
"no-implied-eval": ["error"],
"no-lone-blocks": ["error"],
"no-iterator": ["error"],
"no-labels": ["error"],
"no-with": ["warn"],
"yoda": ["error"],
"no-new": ["error"],
"no-undef": ["error"],
"no-empty": ["error"],
"no-bitwise": ["error"],
"no-new-func": ["error"],
"import/named": ["off"],
"no-unreachable": ["error"],
"no-throw-literal": ["error"],
"no-useless-rename": ["error"],
"no-new-object": ["error"],
"no-loop-func": ["error"],
"no-multi-str": ["error"],
"no-new-require": ["error"],
"no-new-wrappers": ["error"],
"no-sequences": ["error"],
"no-useless-concat": ["error"],
"array-bracket-spacing": ["error", "never"],
"no-var": ["error"],
"no-proto": ["error"],
"global-require": ["error"],
"no-useless-call": ["error"],
"block-scoped-var": ["error"],
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": ["error"],
"computed-property-spacing": ["error", "never"],
"id-blacklist": ["warn", "err", "cb", "callback"],
"max-nested-callbacks": ["error", {"max": 4}],
"lines-between-class-members": ["warn", "always"],
"no-duplicate-imports": ["error", {"includeExports": true}],
"func-style": ["error", "declaration", {"allowArrowFunctions": true}],
"no-mixed-operators": ["error", {"groups": [["&&", "||"]]}],
"no-restricted-imports": ["error", {"paths": ["import1", "import2"], "patterns": ["import1/private/*", "import2/*", "!import2/good"]}],
"no-prototype-builtins": ["off"]
}
}