-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
75 lines (75 loc) · 2 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
71
72
73
74
75
module.exports = {
root: true,
plugins: ["@typescript-eslint", "import"],
env: {
browser: true,
es6: true,
node: true,
},
parserOptions: {
sourceType: "module",
ecmaVersion: "latest",
ecmaFeatures: {
jsx: false,
},
},
extends: ["eslint:recommended", "prettier"],
rules: {
"import/first": "error",
"import/no-absolute-path": "error",
"import/no-amd": "error",
"import/no-mutable-exports": "error",
"import/no-named-default": "warn",
"import/no-self-import": "error",
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: ["**/*.test.js", "**/*.test.ts"],
},
],
},
overrides: [
{
files: ["*.ts"],
parser: "@typescript-eslint/parser",
extends: [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
],
rules: {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/linebreak-style": 0,
"no-unused-expressions": [
"error",
{
allowShortCircuit: true,
allowTernary: true,
},
],
"@typescript-eslint/no-empty-function": "off",
"max-statements": ["warn", 200],
"no-empty": "off",
"no-var": "off",
"no-unused-vars": "off",
"linebreak-style": [ 0, "after", { "overrides": {
"?": "ignore",
":": "ignore",
"+": "ignore",
"|": "ignore",
"||": "ignore",
} } ],
"no-use-before-define": 0,
"no-empty-pattern": 0,
"no-unsafe-finally": 0,
},
},
],
};