-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
145 lines (145 loc) · 3.72 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": { "sourceType": "module", "project": "./tsconfig.json" },
"ignorePatterns": ["webpack.config.js"],
"env": {
"browser": true,
"node": true,
"commonjs": true,
"es6": true,
"mocha": true,
"jquery": true
},
"globals": {
"Promise": true,
"beforeAll": true,
"afterAll": true,
"expect": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/typescript"
],
"plugins": ["prettier", "@typescript-eslint", "import"],
"settings": {
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx", ".d.ts"] },
"import/resolver": {
"node": {
"extensions": [".js", ".ts", ".tsx", ".d.ts"]
},
"typescript": {}
}
},
"rules": {
"import/no-unresolved": "error",
"no-template-curly-in-string": "error",
"no-unsafe-negation": "error",
"valid-jsdoc": "off",
"no-alert": "error",
"no-console": "warn",
"no-await-in-loop": "warn",
"no-caller": "error",
"no-empty-function": "warn",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "warn",
"no-global-assign": "error",
"no-return-await": "error",
"no-implied-eval": "error",
"no-lone-blocks": "warn",
"no-loop-func": "warn",
"no-magic-numbers": "off",
"no-multi-str": "warn",
"no-new-wrappers": "error",
"no-param-reassign": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "error",
"no-useless-concat": "warn",
"no-useless-escape": "warn",
"no-void": "error",
"no-with": "error",
"radix": "error",
"vars-on-top": "off",
"yoda": "warn",
"strict": ["error", "safe"],
"no-shadow-restricted-names": "error",
"no-undef-init": "warn",
"no-undef": "off",
"no-use-before-define": "error",
"camelcase": "off",
"consistent-this": ["error", "_this"],
"id-blacklist": "off",
"max-depth": ["warn", 3],
"max-params": ["warn", 3],
"max-statements-per-line": ["error", { "max": 1 }],
"newline-after-var": "warn",
"newline-before-return": "warn",
"no-array-constructor": "error",
"no-bitwise": "error",
"no-new-object": "error",
"no-self-assign": "error",
"no-unneeded-ternary": "warn",
"no-class-assign": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-this-before-super": "error",
"no-var": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"prefer-const": "error",
"prefer-spread": "error",
"prefer-template": "error",
"prefer-object-spread": "error",
"import/first": "error",
"import/dynamic-import-chunkname": "error",
"import/no-useless-path-segments": "error",
"import/no-duplicates": "error",
"import/named": "error",
"import/newline-after-import": "error",
"import/order": [
"error",
{
"newlines-between": "always",
"alphabetize": { "order": "asc" },
"groups": [
["builtin", "external"],
"internal",
"parent",
["sibling", "index"],
"unknown"
]
}
]
},
"overrides": [
{
"files": ["**/*.ts", "**/*.d.ts"],
"parser": "@typescript-eslint/parser",
"rules": {
"no-unused-vars": "off",
"react/prop-types": "off",
"no-use-before-define": "off",
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"],
"@typescript-eslint/no-use-before-define": ["error"],
"@typescript-eslint/no-unused-vars": [
"error",
{ "vars": "all", "args": "after-used", "ignoreRestSiblings": false }
]
}
},
{
"files": ["**/*.spec.*"],
"rules": { "import/dynamic-import-chunkname": "off", "max-nested-callbacks": "off" }
}
]
}