-
Notifications
You must be signed in to change notification settings - Fork 5
/
base.js
82 lines (80 loc) · 2.24 KB
/
base.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
76
77
78
79
80
81
82
// Note: Base config used for building both the legacy and flat configs.
// It is not a valid ESLint config.
const baseConfig = {
ecmaVersion: 2019,
sourceType: "module",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
rules: {
curly: "error",
"dot-notation": "off",
"eol-last": "error",
eqeqeq: ["error", "always", { null: "ignore" }],
"guard-for-in": "off",
"jsdoc/check-alignment": "error",
"new-parens": "error",
"no-array-constructor": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": ["error", { allow: ["error", "log", "warn", "info"] }],
"no-debugger": "error",
"no-empty": "off",
"no-eval": "error",
"no-fallthrough": "off",
"no-new-wrappers": "error",
"no-redeclare": "error",
"no-restricted-imports": ["error", "moment"],
"no-shadow": "off",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-var": "error",
radix: "error",
"sort-keys": "off",
"spaced-comment": ["off", "always"],
"use-isnan": "error",
"no-duplicate-imports": "error",
"@typescript-eslint/no-unused-expressions": [
"error",
{ allowShortCircuit: true, allowTernary: true },
],
"@typescript-eslint/array-type": ["error", { default: "array-simple" }],
"@typescript-eslint/naming-convention": [
"error",
{
selector: "interface",
format: ["PascalCase"],
custom: {
regex: "^I[A-Z]",
match: false,
},
},
],
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-namespace": ["error", { allowDeclarations: false }],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/triple-slash-reference": "error",
"@stylistic/ts/type-annotation-spacing": [
"error",
{
after: true,
before: false,
overrides: {
arrow: { after: true, before: true },
},
},
],
"react-hooks/exhaustive-deps": "error",
},
settings: {
react: {
version: "detect",
},
},
};
module.exports = baseConfig;