-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
133 lines (128 loc) · 3.63 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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
module.exports = {
env: {
es6: true,
node: true,
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/all", "prettier"],
ignorePatterns: ["node_modules", ".eslintrc.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
sourceType: "module",
},
plugins: [
"@typescript-eslint",
"@typescript-eslint/tslint",
"prefer-arrow",
"import",
"no-null",
"unicorn",
"jsdoc",
"promise",
"prettier",
"only-warn",
],
root: true,
rules: {
"import/order": [
"warn",
{
groups: [
"builtin",
"type",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
],
pathGroups: [
{
pattern: "@antib-es/**",
group: "external",
position: "after",
},
{
pattern: "../../../**",
group: "parent",
position: "before",
},
{
pattern: "../../**",
group: "parent",
position: "before",
},
{
pattern: "../**",
group: "parent",
position: "before",
},
],
pathGroupsExcludedImportTypes: ["type"],
"newlines-between": "always",
},
],
"no-prototype-builtins": "off",
"no-case-declarations": "warn",
"prettier/prettier": [
"warn",
{
printWidth: 120,
tabWidth: 2,
useTabs: false,
endOfLine: "auto",
singleQuote: true,
quoteProps: "consistent",
trailingComma: "all",
arrowParens: "avoid",
semi: true,
bracketSpacing: true,
},
],
"padding-line-between-statements": [
"warn",
{ blankLine: "always", prev: "*", next: "return" },
{ blankLine: "always", prev: ["const", "let", "var"], next: "*" },
{
blankLine: "any",
prev: ["const", "let", "var"],
next: ["const", "let", "var"],
},
],
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/no-confusing-void-expression": [
"warn",
{ ignoreArrowShorthand: true },
],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/require-array-sort-compare": [
"warn",
{ ignoreStringArrays: true },
],
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/parameter-properties": "off",
"@typescript-eslint/member-ordering": [
"warn",
{ default: ["field", "constructor", "signature", "method"] },
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-misused-promise": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
},
};