-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
116 lines (116 loc) · 2.62 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
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
{
"root": true,
"env": {
"es6": true,
"node": true,
"jest": true,
"browser": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended"
],
"plugins": ["@typescript-eslint", "import", "unused-imports", "jest", "prettier"],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"rules": {
"no-var": ["error"],
"no-alert": ["error"],
"no-labels": ["error"],
"no-debugger": ["warn"],
"no-console": [
"warn",
{
"allow": ["warn", "error"]
}
],
"eol-last": ["error", "always"],
// Custom
"prettier/prettier": ["error"],
"import/no-unused-modules": ["error"],
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type"
]
}
],
"unused-imports/no-unused-imports": "error",
// Typescript
"@typescript-eslint/array-type": [
"error",
{
"default": "array-simple"
}
],
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description"
}
],
"@typescript-eslint/explicit-function-return-type": ["error"],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"]
},
{
"selector": "variable",
"modifiers": ["const"],
"format": ["camelCase", "PascalCase"]
},
{
"selector": "variable",
"types": ["boolean"],
"format": ["PascalCase"],
"prefix": ["is", "should", "has", "can", "did", "will"]
},
{
"selector": "enumMember",
"format": ["PascalCase"]
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}
],
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true,
"ignoreProperties": true
}
],
"@typescript-eslint/explicit-member-accessibility": ["error"]
},
"overrides": [{
"files": ["benches/**/*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off"
}
}]
}