-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
151 lines (142 loc) · 4.45 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"root": true,
"parser": "@typescript-eslint/parser",
"reportUnusedDisableDirectives": true,
"env": {
"browser": true,
"es2021": true,
"node": true
},
"globals": {
"window": true,
"document": true,
"globalThis": true
},
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"sort-destructure-keys",
"simple-import-sort",
"import"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:n/recommended",
"standard-with-typescript"
],
"settings": {
"import/resolver": {
"node": { "extensions": [".js", ".mjs"] }
}
},
"rules": {
"indent": "off",
"import/first": "error",
"no-multi-spaces": "error",
"no-throw-literal": "error",
"n/no-extraneous-import": "off",
"import/no-duplicates": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/newline-after-import": "error",
"object-curly-spacing": ["error", "always"],
"max-len": ["error", { "code": 120, "tabWidth": 2 }],
"padding-line-between-statements": [ "error",
{ "blankLine": "always", "next": ["block", "block-like"], "prev": ["block", "block-like"] },
{ "blankLine": "any", "next": ["case", "default"], "prev": "case" },
{ "blankLine": "always", "next": "return", "prev": "*" },
{ "blankLine": "always", "next": "*", "prev": "directive" },
{ "blankLine": "any", "next": "directive", "prev": "directive" },
{ "blankLine": "always", "next": "*", "prev": ["const", "let", "var"] },
{ "blankLine": "any", "next": ["const", "let", "var"], "prev": ["const", "let", "var"] },
{ "blankLine": "always", "next": ["export", "cjs-export"], "prev": "*" },
{ "blankLine": "any", "next": ["export", "cjs-export"], "prev": ["export", "cjs-export"] },
{ "blankLine": "always", "next": "*", "prev": ["import", "cjs-import"] },
{ "blankLine": "any", "next": ["import", "cjs-import"], "prev": ["import", "cjs-import"] }
],
"@typescript-eslint/key-spacing": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/prefer-function-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/indent": ["error", 2, {
"SwitchCase": 1,
"VariableDeclarator": 1,
"outerIIFEBody": 1,
"MemberExpression": 1,
"FunctionDeclaration": { "parameters": 1, "body": 1 },
"FunctionExpression": { "parameters": 1, "body": 1 },
"CallExpression": { "arguments": 1 },
"ArrayExpression": 1,
"ObjectExpression": 1,
"ImportDeclaration": 1,
"flatTernaryExpressions": false,
"ignoreComments": false,
"ignoredNodes": [
"TemplateLiteral *",
"JSXElement",
"JSXElement > *",
"JSXAttribute",
"JSXIdentifier",
"JSXNamespacedName",
"JSXMemberExpression",
"JSXSpreadAttribute",
"JSXExpressionContainer",
"JSXOpeningElement",
"JSXClosingElement",
"JSXFragment",
"JSXOpeningFragment",
"JSXClosingFragment",
"JSXText",
"JSXEmptyExpression",
"JSXSpreadChild",
"TSTypeParameterInstantiation",
"FunctionExpression > .params[decorators.length > 0]",
"FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
],
"offsetTernaryExpressions": true
}]
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"n/no-missing-import": "off",
"import/no-unresolved": "off"
}
}
],
"ignorePatterns": [
"*.min.*",
"*.d.ts",
"CHANGELOG.md",
"**/*.html",
"dist",
"LICENSE*",
"output",
"coverage",
"public",
"examples",
"playground",
"packages-lock.json",
"pnpm-lock.yaml",
"yarn.lock",
"__snapshots__",
"!.github",
"!.vscode",
"!.vitepress"
]
}