-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
91 lines (91 loc) · 3.26 KB
/
.eslintrc
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
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "import"],
"env": {
"node": true,
"browser": true
},
"parserOptions": {
"project": ["./tsconfig.json"]
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"prettier"
],
"settings": {
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] },
"import/resolver": {
"typescript": { "alwaysTryTypes": true, "project": "./tsconfig.json" }
}
},
"rules": {
// Enforce newline at the end of file, with no multiple empty lines.
"eol-last": "error",
"no-console": "warn",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/consistent-type-imports": [
"error",
{ "disallowTypeAnnotations": false }
],
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": false,
"types": {
"String": { "message": "Use string instead", "fixWith": "string" },
"Number": { "message": "Use number instead", "fixWith": "number" },
"Boolean": { "message": "Use boolean instead", "fixWith": "boolean" },
"Symbol": { "message": "Use symbol instead", "fixWith": "symbol" }
}
}
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/no-empty-interface": "off",
"arrow-body-style": ["error", "as-needed"],
"class-methods-use-this": [
"warn",
{ "exceptMethods": ["toString", "shouldComponentUpdate"] }
],
"complexity": ["warn", { "max": 100 }],
"curly": ["error", "multi-line", "consistent"],
"eqeqeq": ["error", "smart"],
"no-async-promise-executor": "off",
"no-case-declarations": "off",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-useless-concat": "error",
"no-useless-computed-key": "warn",
"no-useless-escape": "error",
"no-debugger": "off",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-inner-declarations": "off",
"no-lonely-if": "error",
"no-template-curly-in-string": "error",
"no-var": "error",
"import/export": "off",
"import/order": ["error", { "groups": ["builtin", "external"] }],
"object-shorthand": ["error", "always", { "ignoreConstructors": true }],
"one-var": ["error", { "var": "never", "let": "never" }],
"prefer-arrow-callback": "error",
"prefer-const": ["error", { "destructuring": "all" }],
"prefer-destructuring": "warn",
"prefer-object-spread": "error",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"quote-props": ["error", "as-needed"],
"spaced-comment": ["error", "always", { "markers": ["/"] }],
"sort-imports": ["warn", { "ignoreDeclarationSort": true }],
"yoda": ["error", "never", { "exceptRange": true }]
}
}