-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.eslintrc.js
70 lines (67 loc) · 2.08 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
module.exports = {
env: { browser: true, node: true },
root: true,
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
"import",
"simple-import-sort",
"unused-imports",
"ban",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
rules: {
"import/order": 0, // turn off in favor of eslint-plugin-simple-import-sort
"import/no-unresolved": 0,
"import/no-duplicates": 1,
/**
* eslint-plugin-simple-import-sort @see https://github.com/lydell/eslint-plugin-simple-import-sort
*/
"sort-imports": 0, // we use eslint-plugin-import instead
"simple-import-sort/imports": 1,
"simple-import-sort/exports": 1,
/**
* @typescript-eslint/eslint-plugin @see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
*/
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-empty-interface": "off",
/**
* ESLint core rules @see https://eslint.org/docs/rules/
*/
"no-case-declarations": "off",
"no-empty": "off",
"no-useless-escape": "off",
"no-control-regex": "off",
"ban/ban": [
2,
{
name: ["Object", "keys"],
message:
"Object.keys() is not supported in legacy browsers, use objectKeys()",
},
{
name: ["Object", "setPrototypeOf"],
message: "Object.setPrototypeOf() is not supported in legacy browsers",
},
{
name: ["Number", "isNaN"],
message: "Number.isNaN() is not supported in legacy browsers",
},
{
name: ["Number", "isInteger"],
message: "Number.isInteger() is not supported in legacy browsers",
},
],
},
};