@joshuaavalon/eslint-config-typescript 8.2.3 → 9.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/eslint.d.ts +2 -0
- package/dist/eslint.js +210 -0
- package/dist/eslint.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/perfectionist.d.ts +5 -0
- package/dist/perfectionist.js +70 -0
- package/dist/perfectionist.js.map +1 -0
- package/dist/stylistic.d.ts +3 -0
- package/dist/stylistic.js +6 -0
- package/dist/stylistic.js.map +1 -0
- package/package.json +12 -10
- package/dist/cjs/index.js +0 -251
- package/dist/esm/index.js +0 -249
package/dist/eslint.d.ts
ADDED
package/dist/eslint.js
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
export const typescriptEslintRules = {
|
2
|
+
"@typescript-eslint/adjacent-overload-signatures": ["error"],
|
3
|
+
"@typescript-eslint/array-type": ["error", { default: "array" }],
|
4
|
+
"@typescript-eslint/await-thenable": ["error"],
|
5
|
+
"@typescript-eslint/ban-ts-comment": [
|
6
|
+
"error",
|
7
|
+
{
|
8
|
+
minimumDescriptionLength: 3,
|
9
|
+
"ts-check": "allow-with-description",
|
10
|
+
"ts-expect-error": "allow-with-description",
|
11
|
+
"ts-ignore": "allow-with-description",
|
12
|
+
"ts-nocheck": "allow-with-description"
|
13
|
+
}
|
14
|
+
],
|
15
|
+
"@typescript-eslint/ban-tslint-comment": ["error"],
|
16
|
+
"@typescript-eslint/class-literal-property-style": ["off"],
|
17
|
+
"@typescript-eslint/class-methods-use-this": ["off"],
|
18
|
+
"@typescript-eslint/consistent-generic-constructors": ["error"],
|
19
|
+
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
|
20
|
+
"@typescript-eslint/consistent-return": ["off"],
|
21
|
+
"@typescript-eslint/consistent-type-assertions": ["off"],
|
22
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
23
|
+
"@typescript-eslint/consistent-type-exports": ["error"],
|
24
|
+
"@typescript-eslint/consistent-type-imports": ["error"],
|
25
|
+
"@typescript-eslint/default-param-last": ["error"],
|
26
|
+
"@typescript-eslint/dot-notation": ["error"],
|
27
|
+
"@typescript-eslint/explicit-function-return-type": [
|
28
|
+
"error",
|
29
|
+
{
|
30
|
+
allowDirectConstAssertionInArrowFunctions: true,
|
31
|
+
allowExpressions: true,
|
32
|
+
allowHigherOrderFunctions: true,
|
33
|
+
allowTypedFunctionExpressions: true
|
34
|
+
}
|
35
|
+
],
|
36
|
+
"@typescript-eslint/explicit-member-accessibility": ["error"],
|
37
|
+
"@typescript-eslint/explicit-module-boundary-types": ["error"],
|
38
|
+
"@typescript-eslint/init-declarations": ["off"],
|
39
|
+
"@typescript-eslint/max-params": ["error", { max: 3 }],
|
40
|
+
"@typescript-eslint/member-ordering": ["off"],
|
41
|
+
"@typescript-eslint/method-signature-style": ["off"],
|
42
|
+
"@typescript-eslint/naming-convention": [
|
43
|
+
"error",
|
44
|
+
{
|
45
|
+
format: ["camelCase"],
|
46
|
+
leadingUnderscore: "allow",
|
47
|
+
selector: "default"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
format: [
|
51
|
+
"camelCase",
|
52
|
+
"UPPER_CASE",
|
53
|
+
"PascalCase"
|
54
|
+
],
|
55
|
+
leadingUnderscore: "allow",
|
56
|
+
selector: "variable"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
format: ["PascalCase"],
|
60
|
+
selector: "typeLike"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
format: ["camelCase", "PascalCase"],
|
64
|
+
selector: "import"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
format: ["camelCase", "PascalCase"],
|
68
|
+
selector: "function"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
format: null,
|
72
|
+
modifiers: ["destructured"],
|
73
|
+
selector: "variable"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
format: null,
|
77
|
+
selector: "objectLiteralProperty"
|
78
|
+
}
|
79
|
+
],
|
80
|
+
"@typescript-eslint/no-array-constructor": ["error"],
|
81
|
+
"@typescript-eslint/no-array-delete": ["error"],
|
82
|
+
"@typescript-eslint/no-base-to-string": ["error"],
|
83
|
+
"@typescript-eslint/no-confusing-non-null-assertion": ["error"],
|
84
|
+
"@typescript-eslint/no-confusing-void-expression": ["error"],
|
85
|
+
"@typescript-eslint/no-deprecated": ["error"],
|
86
|
+
"@typescript-eslint/no-dupe-class-members": ["off"],
|
87
|
+
"@typescript-eslint/no-duplicate-enum-values": ["error"],
|
88
|
+
"@typescript-eslint/no-duplicate-type-constituents": ["error"],
|
89
|
+
"@typescript-eslint/no-dynamic-delete": ["error"],
|
90
|
+
"@typescript-eslint/no-empty-function": ["error"],
|
91
|
+
"@typescript-eslint/no-empty-object-type": [
|
92
|
+
"error",
|
93
|
+
{
|
94
|
+
allowInterfaces: "always",
|
95
|
+
allowObjectTypes: "always"
|
96
|
+
}
|
97
|
+
],
|
98
|
+
"@typescript-eslint/no-explicit-any": ["off"],
|
99
|
+
"@typescript-eslint/no-extra-non-null-assertion": ["error"],
|
100
|
+
"@typescript-eslint/no-extraneous-class": ["error"],
|
101
|
+
"@typescript-eslint/no-floating-promises": ["off"],
|
102
|
+
"@typescript-eslint/no-for-in-array": ["error"],
|
103
|
+
"@typescript-eslint/no-implied-eval": ["error"],
|
104
|
+
"@typescript-eslint/no-import-type-side-effects": ["error"],
|
105
|
+
"@typescript-eslint/no-inferrable-types": ["error"],
|
106
|
+
"@typescript-eslint/no-invalid-this": ["off"],
|
107
|
+
"@typescript-eslint/no-invalid-void-type": ["error"],
|
108
|
+
"@typescript-eslint/no-loop-func": ["error"],
|
109
|
+
"@typescript-eslint/no-magic-numbers": ["off"],
|
110
|
+
"@typescript-eslint/no-meaningless-void-operator": ["error"],
|
111
|
+
"@typescript-eslint/no-misused-new": ["error"],
|
112
|
+
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
|
113
|
+
"@typescript-eslint/no-mixed-enums": ["error"],
|
114
|
+
"@typescript-eslint/no-namespace": ["error"],
|
115
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": ["error"],
|
116
|
+
"@typescript-eslint/no-non-null-asserted-optional-chain": ["error"],
|
117
|
+
"@typescript-eslint/no-non-null-assertion": ["error"],
|
118
|
+
"@typescript-eslint/no-redeclare": ["off"],
|
119
|
+
"@typescript-eslint/no-redundant-type-constituents": ["error"],
|
120
|
+
"@typescript-eslint/no-require-imports": ["error"],
|
121
|
+
"@typescript-eslint/no-restricted-imports": ["off"],
|
122
|
+
"@typescript-eslint/no-restricted-types": ["off"],
|
123
|
+
"@typescript-eslint/no-shadow": ["off"],
|
124
|
+
"@typescript-eslint/no-this-alias": ["error"],
|
125
|
+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": ["error"],
|
126
|
+
"@typescript-eslint/no-unnecessary-condition": ["error"],
|
127
|
+
"@typescript-eslint/no-unnecessary-parameter-property-assignment": ["error"],
|
128
|
+
"@typescript-eslint/no-unnecessary-qualifier": ["error"],
|
129
|
+
"@typescript-eslint/no-unnecessary-template-expression": ["off"],
|
130
|
+
"@typescript-eslint/no-unnecessary-type-arguments": ["error"],
|
131
|
+
"@typescript-eslint/no-unnecessary-type-assertion": ["error"],
|
132
|
+
"@typescript-eslint/no-unnecessary-type-constraint": ["error"],
|
133
|
+
"@typescript-eslint/no-unnecessary-type-parameters": ["off"], // Complexity
|
134
|
+
"@typescript-eslint/no-unsafe-argument": ["off"],
|
135
|
+
"@typescript-eslint/no-unsafe-assignment": ["off"],
|
136
|
+
"@typescript-eslint/no-unsafe-call": ["off"],
|
137
|
+
"@typescript-eslint/no-unsafe-declaration-merging": ["off"],
|
138
|
+
"@typescript-eslint/no-unsafe-enum-comparison": ["off"],
|
139
|
+
"@typescript-eslint/no-unsafe-function-type": ["off"],
|
140
|
+
"@typescript-eslint/no-unsafe-member-access": ["off"],
|
141
|
+
"@typescript-eslint/no-unsafe-return": ["off"],
|
142
|
+
"@typescript-eslint/no-unsafe-unary-minus": ["error"],
|
143
|
+
"@typescript-eslint/no-unused-expressions": ["error"],
|
144
|
+
"@typescript-eslint/no-unused-vars": [
|
145
|
+
"error",
|
146
|
+
{
|
147
|
+
args: "all",
|
148
|
+
argsIgnorePattern: "^_",
|
149
|
+
caughtErrors: "all",
|
150
|
+
caughtErrorsIgnorePattern: "^_",
|
151
|
+
destructuredArrayIgnorePattern: "^_",
|
152
|
+
ignoreRestSiblings: true,
|
153
|
+
varsIgnorePattern: "^_"
|
154
|
+
}
|
155
|
+
],
|
156
|
+
"@typescript-eslint/no-use-before-define": ["error"],
|
157
|
+
"@typescript-eslint/no-useless-constructor": ["error"],
|
158
|
+
"@typescript-eslint/no-useless-empty-export": ["error"],
|
159
|
+
"@typescript-eslint/no-wrapper-object-types": ["error"],
|
160
|
+
"@typescript-eslint/non-nullable-type-assertion-style": ["error"],
|
161
|
+
"@typescript-eslint/only-throw-error": ["error"],
|
162
|
+
"@typescript-eslint/parameter-properties": ["error"],
|
163
|
+
"@typescript-eslint/prefer-as-const": ["error"],
|
164
|
+
"@typescript-eslint/prefer-destructuring": ["off"],
|
165
|
+
"@typescript-eslint/prefer-enum-initializers": ["error"],
|
166
|
+
"@typescript-eslint/prefer-find": ["error"],
|
167
|
+
"@typescript-eslint/prefer-for-of": ["error"],
|
168
|
+
"@typescript-eslint/prefer-function-type": ["off"],
|
169
|
+
"@typescript-eslint/prefer-includes": ["error"],
|
170
|
+
"@typescript-eslint/prefer-literal-enum-member": ["error"],
|
171
|
+
"@typescript-eslint/prefer-namespace-keyword": ["error"],
|
172
|
+
"@typescript-eslint/prefer-nullish-coalescing": ["error"],
|
173
|
+
"@typescript-eslint/prefer-optional-chain": ["error"],
|
174
|
+
"@typescript-eslint/prefer-promise-reject-errors": ["error"],
|
175
|
+
"@typescript-eslint/prefer-readonly": ["error"],
|
176
|
+
"@typescript-eslint/prefer-readonly-parameter-types": ["off"],
|
177
|
+
"@typescript-eslint/prefer-reduce-type-parameter": ["error"],
|
178
|
+
"@typescript-eslint/prefer-regexp-exec": ["error"],
|
179
|
+
"@typescript-eslint/prefer-return-this-type": ["error"],
|
180
|
+
"@typescript-eslint/prefer-string-starts-ends-with": ["error"],
|
181
|
+
"@typescript-eslint/promise-function-async": ["off"],
|
182
|
+
"@typescript-eslint/require-array-sort-compare": ["error", { ignoreStringArrays: true }],
|
183
|
+
"@typescript-eslint/require-await": ["off"],
|
184
|
+
"@typescript-eslint/restrict-plus-operands": ["error"],
|
185
|
+
"@typescript-eslint/restrict-template-expressions": ["off"],
|
186
|
+
"@typescript-eslint/return-await": ["error", "always"],
|
187
|
+
"@typescript-eslint/sort-type-constituents": ["off"],
|
188
|
+
"@typescript-eslint/strict-boolean-expressions": ["off"],
|
189
|
+
"@typescript-eslint/switch-exhaustiveness-check": ["error"],
|
190
|
+
"@typescript-eslint/triple-slash-reference": ["error"],
|
191
|
+
"@typescript-eslint/typedef": ["off"],
|
192
|
+
"@typescript-eslint/unbound-method": ["error"],
|
193
|
+
"@typescript-eslint/unified-signatures": ["off"],
|
194
|
+
"@typescript-eslint/use-unknown-in-catch-callback-variable": ["error"],
|
195
|
+
"default-param-last": ["off"],
|
196
|
+
"dot-notation": ["off"],
|
197
|
+
"max-params": ["off"],
|
198
|
+
"no-array-constructor": ["off"],
|
199
|
+
"no-duplicate-imports": ["off"],
|
200
|
+
"no-empty-function": ["off"],
|
201
|
+
"no-implied-eval": ["off"],
|
202
|
+
"no-invalid-this": ["off"],
|
203
|
+
"no-loop-func": ["off"],
|
204
|
+
"no-redeclare": ["off"],
|
205
|
+
"no-unused-expressions": ["off"],
|
206
|
+
"no-unused-vars": ["off"],
|
207
|
+
"no-use-before-define": ["off"],
|
208
|
+
"prefer-promise-reject-errors": ["off"]
|
209
|
+
};
|
210
|
+
//# sourceMappingURL=eslint.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eslint.js","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAkD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ACvB,YAAY,EAAE,CAAC,KAAK,CAAC;IACrB,sBAAsB,EAAE,CAAC,KAAK,CAAC;IAC/B,sBAAsB,EAAE,CAAC,KAAK,CAAC;IAC/B,mBAAmB,EAAE,CAAC,KAAK,CAAC;IAC5B,iBAAiB,EAAE,CAAC,KAAK,CAAC;IAC1B,iBAAiB,EAAE,CAAC,KAAK,CAAC;IAC1B,cAAc,EAAE,CAAC,KAAK,CAAC;IACvB,cAAc,EAAE,CAAC,KAAK,CAAC;IACvB,uBAAuB,EAAE,CAAC,KAAK,CAAC;IAChC,gBAAgB,EAAE,CAAC,KAAK,CAAC;IACzB,sBAAsB,EAAE,CAAC,KAAK,CAAC;IAC/B,8BAA8B,EAAE,CAAC,KAAK,CAAC;CACxC,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
import jsConfig from "@joshuaavalon/eslint-config-javascript";
|
2
|
+
import typescriptEslint from "typescript-eslint";
|
3
|
+
import { typescriptEslintRules } from "./eslint.js";
|
4
|
+
import { perfectionistRules } from "./perfectionist.js";
|
5
|
+
import { stylisticRules } from "./stylistic.js";
|
6
|
+
const config = {
|
7
|
+
plugins: {
|
8
|
+
...jsConfig.plugins,
|
9
|
+
"@typescript-eslint": typescriptEslint.plugin
|
10
|
+
},
|
11
|
+
rules: {
|
12
|
+
...jsConfig.rules,
|
13
|
+
...typescriptEslintRules,
|
14
|
+
...stylisticRules,
|
15
|
+
...perfectionistRules
|
16
|
+
}
|
17
|
+
};
|
18
|
+
export default config;
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,wCAAwC,CAAC;AAC9D,OAAO,gBAAgB,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIhD,MAAM,MAAM,GAAkB;IAC5B,OAAO,EAAE;QACP,GAAG,QAAQ,CAAC,OAAO;QACnB,oBAAoB,EAAE,gBAAgB,CAAC,MAAuB;KAC/D;IACD,KAAK,EAAE;QACL,GAAG,QAAQ,CAAC,KAAK;QACjB,GAAG,qBAAqB;QACxB,GAAG,cAAc;QACjB,GAAG,kBAAkB;KACtB;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { PrefixRuleModules } from "@joshuaavalon/eslint-config-javascript/utils";
|
2
|
+
import type { rules } from "eslint-plugin-perfectionist";
|
3
|
+
type PickRules = "@perfectionist/sort-imports" | "@perfectionist/sort-interfaces" | "@perfectionist/sort-intersection-types" | "@perfectionist/sort-object-types" | "@perfectionist/sort-union-types";
|
4
|
+
export declare const perfectionistRules: Pick<PrefixRuleModules<typeof rules, "@perfectionist/">, PickRules>;
|
5
|
+
export {};
|
@@ -0,0 +1,70 @@
|
|
1
|
+
export const perfectionistRules = {
|
2
|
+
"@perfectionist/sort-imports": [
|
3
|
+
"error",
|
4
|
+
{
|
5
|
+
groups: [
|
6
|
+
"builtin",
|
7
|
+
"external",
|
8
|
+
"internal",
|
9
|
+
"parent",
|
10
|
+
"sibling",
|
11
|
+
"side-effect",
|
12
|
+
"index",
|
13
|
+
"side-effect-style",
|
14
|
+
"builtin-type",
|
15
|
+
"external-type",
|
16
|
+
"internal-type",
|
17
|
+
"parent-type",
|
18
|
+
"sibling-type",
|
19
|
+
"index-type",
|
20
|
+
"object",
|
21
|
+
"unknown"
|
22
|
+
],
|
23
|
+
ignoreCase: true,
|
24
|
+
internalPattern: ["~/**", "@/**", "#**", "#**/**"],
|
25
|
+
newlinesBetween: "ignore",
|
26
|
+
order: "asc",
|
27
|
+
type: "alphabetical"
|
28
|
+
}
|
29
|
+
],
|
30
|
+
"@perfectionist/sort-interfaces": [
|
31
|
+
"error",
|
32
|
+
{
|
33
|
+
ignoreCase: true,
|
34
|
+
order: "asc",
|
35
|
+
partitionByNewLine: false,
|
36
|
+
type: "alphabetical"
|
37
|
+
}
|
38
|
+
],
|
39
|
+
"@perfectionist/sort-intersection-types": [
|
40
|
+
"error",
|
41
|
+
{
|
42
|
+
groups: [],
|
43
|
+
ignoreCase: true,
|
44
|
+
order: "asc",
|
45
|
+
partitionByNewLine: false,
|
46
|
+
type: "alphabetical"
|
47
|
+
}
|
48
|
+
],
|
49
|
+
"@perfectionist/sort-object-types": [
|
50
|
+
"error",
|
51
|
+
{
|
52
|
+
ignoreCase: true,
|
53
|
+
order: "asc",
|
54
|
+
partitionByComment: true,
|
55
|
+
partitionByNewLine: false,
|
56
|
+
type: "alphabetical"
|
57
|
+
}
|
58
|
+
],
|
59
|
+
"@perfectionist/sort-union-types": [
|
60
|
+
"error",
|
61
|
+
{
|
62
|
+
ignoreCase: true,
|
63
|
+
order: "asc",
|
64
|
+
partitionByComment: false,
|
65
|
+
partitionByNewLine: false,
|
66
|
+
type: "alphabetical"
|
67
|
+
}
|
68
|
+
]
|
69
|
+
};
|
70
|
+
//# sourceMappingURL=perfectionist.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"perfectionist.js","sourceRoot":"","sources":["../src/perfectionist.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,kBAAkB,GAAwE;IACrG,6BAA6B,EAAE;QAC7B,OAAO;QACP;YACE,MAAM,EAAE;gBACN,SAAS;gBACT,UAAU;gBACV,UAAU;gBACV,QAAQ;gBACR,SAAS;gBACT,aAAa;gBACb,OAAO;gBACP,mBAAmB;gBACnB,cAAc;gBACd,eAAe;gBACf,eAAe;gBACf,aAAa;gBACb,cAAc;gBACd,YAAY;gBACZ,QAAQ;gBACR,SAAS;aACV;YACD,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;YAClD,eAAe,EAAE,QAAQ;YACzB,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,cAAc;SACrB;KACF;IACD,gCAAgC,EAAE;QAChC,OAAO;QACP;YACE,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,KAAK;YACZ,kBAAkB,EAAE,KAAK;YACzB,IAAI,EAAE,cAAc;SACrB;KACF;IACD,wCAAwC,EAAE;QACxC,OAAO;QACP;YACE,MAAM,EAAE,EAAE;YACV,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,KAAK;YACZ,kBAAkB,EAAE,KAAK;YACzB,IAAI,EAAE,cAAc;SACrB;KACF;IACD,kCAAkC,EAAE;QAClC,OAAO;QACP;YACE,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,KAAK;YACZ,kBAAkB,EAAE,IAAI;YACxB,kBAAkB,EAAE,KAAK;YACzB,IAAI,EAAE,cAAc;SACrB;KACF;IACD,iCAAiC,EAAE;QACjC,OAAO;QACP;YACE,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,KAAK;YACZ,kBAAkB,EAAE,KAAK;YACzB,kBAAkB,EAAE,KAAK;YACzB,IAAI,EAAE,cAAc;SACrB;KACF;CACF,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { PrefixRules } from "@joshuaavalon/eslint-config-javascript/utils";
|
2
|
+
import type { UnprefixedRuleOptions } from "@stylistic/eslint-plugin";
|
3
|
+
export declare const stylisticRules: Pick<PrefixRules<UnprefixedRuleOptions, "@stylistic/">, `@stylistic/type-${string}` & keyof PrefixRules<UnprefixedRuleOptions, "@stylistic/">>;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stylistic.js","sourceRoot":"","sources":["../src/stylistic.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,cAAc,GAAmJ;IAC5K,oCAAoC,EAAE,CAAC,OAAO,CAAC;IAC/C,iCAAiC,EAAE,CAAC,OAAO,CAAC;IAC5C,qCAAqC,EAAE,CAAC,OAAO,CAAC;CACjD,CAAC"}
|
package/package.json
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
{
|
2
2
|
"name": "@joshuaavalon/eslint-config-typescript",
|
3
|
-
"version": "
|
3
|
+
"version": "9.0.1",
|
4
4
|
"description": "Shareable ESLint Typescript config.",
|
5
5
|
"type": "module",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"module": "./dist/index.d.ts",
|
7
|
+
"types": "./dist/index.d.ts",
|
8
8
|
"publishConfig": {
|
9
9
|
"access": "public"
|
10
10
|
},
|
11
11
|
"scripts": {
|
12
|
-
"
|
13
|
-
"build": "
|
12
|
+
"prebuild": "rimraf dist",
|
13
|
+
"build": "tsc"
|
14
14
|
},
|
15
15
|
"exports": {
|
16
|
-
"
|
17
|
-
|
16
|
+
".": {
|
17
|
+
"import": "./dist/index.js",
|
18
|
+
"types": "./dist/index.d.ts"
|
19
|
+
}
|
18
20
|
},
|
19
21
|
"keywords": [
|
20
22
|
"eslint",
|
@@ -35,10 +37,10 @@
|
|
35
37
|
"url": "https://github.com/joshuaavalon/eslint-config/issues"
|
36
38
|
},
|
37
39
|
"dependencies": {
|
38
|
-
"@joshuaavalon/eslint-config-javascript": "^
|
39
|
-
"typescript-eslint": "^8.
|
40
|
+
"@joshuaavalon/eslint-config-javascript": "^9.0.0",
|
41
|
+
"typescript-eslint": "^8.13.0"
|
40
42
|
},
|
41
43
|
"peerDependencies": {
|
42
|
-
"eslint": "^9.
|
44
|
+
"eslint": "^9.14.0"
|
43
45
|
}
|
44
46
|
}
|
package/dist/cjs/index.js
DELETED
@@ -1,251 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var jsConfig = require('@joshuaavalon/eslint-config-javascript');
|
4
|
-
var typescript = require('typescript-eslint');
|
5
|
-
|
6
|
-
/** @type {import("eslint").Linter.RulesRecord} */
|
7
|
-
const extensionRules = {
|
8
|
-
"default-param-last": "off",
|
9
|
-
"@typescript-eslint/default-param-last": "error",
|
10
|
-
"dot-notation": "off",
|
11
|
-
"@typescript-eslint/dot-notation": "error",
|
12
|
-
"no-array-constructor": "off",
|
13
|
-
"@typescript-eslint/no-array-constructor": "error",
|
14
|
-
"no-dupe-class-members": "off",
|
15
|
-
"@typescript-eslint/no-dupe-class-members": "error",
|
16
|
-
"no-implied-eval": "off",
|
17
|
-
"@typescript-eslint/no-implied-eval": "error",
|
18
|
-
"no-loop-func": "off",
|
19
|
-
"@typescript-eslint/no-loop-func": "error",
|
20
|
-
"no-redeclare": "off",
|
21
|
-
"@typescript-eslint/no-redeclare": "error",
|
22
|
-
"no-throw-literal": "off",
|
23
|
-
"@typescript-eslint/only-throw-error": "error",
|
24
|
-
"no-unused-expressions": "off",
|
25
|
-
"@typescript-eslint/no-unused-expressions": "error",
|
26
|
-
"no-unused-vars": "off",
|
27
|
-
"@typescript-eslint/no-unused-vars": ["error",
|
28
|
-
{
|
29
|
-
args: "all",
|
30
|
-
argsIgnorePattern: "^_",
|
31
|
-
caughtErrors: "all",
|
32
|
-
caughtErrorsIgnorePattern: "^_",
|
33
|
-
destructuredArrayIgnorePattern: "^_",
|
34
|
-
varsIgnorePattern: "^_",
|
35
|
-
ignoreRestSiblings: true
|
36
|
-
}],
|
37
|
-
"no-use-before-define": "off",
|
38
|
-
"@typescript-eslint/no-use-before-define": "error",
|
39
|
-
"no-useless-constructor": "off",
|
40
|
-
"@typescript-eslint/no-useless-constructor": "error",
|
41
|
-
"require-await": "off",
|
42
|
-
"@typescript-eslint/require-await": "off",
|
43
|
-
"no-return-await": "off",
|
44
|
-
"@typescript-eslint/return-await": ["error", "always"]
|
45
|
-
};
|
46
|
-
|
47
|
-
/** @type {import("eslint").Linter.RulesRecord} */
|
48
|
-
const rules$2 = {
|
49
|
-
"constructor-super": "off",
|
50
|
-
"no-invalid-this": "off",
|
51
|
-
"no-undef": "off",
|
52
|
-
"no-const-assign": "off",
|
53
|
-
"no-this-before-super": "off",
|
54
|
-
"no-dupe-args": "off",
|
55
|
-
"no-unreachable": "off",
|
56
|
-
"getter-return": "off",
|
57
|
-
"no-dupe-keys": "off",
|
58
|
-
"no-func-assign": "off",
|
59
|
-
"no-dupe-class-members": "off",
|
60
|
-
"no-obj-calls": "off",
|
61
|
-
"no-setter-return": "off",
|
62
|
-
"no-unsafe-negation": "off",
|
63
|
-
"no-import-assign": "off",
|
64
|
-
"@typescript-eslint/adjacent-overload-signatures": "error",
|
65
|
-
"@typescript-eslint/array-type": "error",
|
66
|
-
"@typescript-eslint/await-thenable": "error",
|
67
|
-
"@typescript-eslint/no-empty-object-type": ["error",
|
68
|
-
{
|
69
|
-
allowInterfaces: "always",
|
70
|
-
allowObjectTypes: "always"
|
71
|
-
}],
|
72
|
-
"@typescript-eslint/no-unsafe-function-type": "error",
|
73
|
-
"@typescript-eslint/no-wrapper-object-types": "error",
|
74
|
-
"@typescript-eslint/consistent-generic-constructors": "error",
|
75
|
-
"@typescript-eslint/consistent-type-exports": "error",
|
76
|
-
"@typescript-eslint/consistent-type-imports": "error",
|
77
|
-
"@typescript-eslint/explicit-function-return-type": [
|
78
|
-
"error",
|
79
|
-
{
|
80
|
-
allowExpressions: true,
|
81
|
-
allowTypedFunctionExpressions: true,
|
82
|
-
allowHigherOrderFunctions: true,
|
83
|
-
allowDirectConstAssertionInArrowFunctions: true
|
84
|
-
}
|
85
|
-
],
|
86
|
-
"@typescript-eslint/explicit-member-accessibility": "error",
|
87
|
-
"@typescript-eslint/explicit-module-boundary-types": "error",
|
88
|
-
"@typescript-eslint/naming-convention": [
|
89
|
-
"error",
|
90
|
-
{
|
91
|
-
format: ["camelCase"],
|
92
|
-
leadingUnderscore: "allow",
|
93
|
-
selector: "default"
|
94
|
-
},
|
95
|
-
{
|
96
|
-
format: [
|
97
|
-
"camelCase",
|
98
|
-
"UPPER_CASE",
|
99
|
-
"PascalCase"
|
100
|
-
],
|
101
|
-
leadingUnderscore: "allow",
|
102
|
-
selector: "variable"
|
103
|
-
},
|
104
|
-
{
|
105
|
-
selector: "typeLike",
|
106
|
-
format: ["PascalCase"]
|
107
|
-
},
|
108
|
-
{
|
109
|
-
selector: "import",
|
110
|
-
format: ["camelCase", "PascalCase"]
|
111
|
-
},
|
112
|
-
{
|
113
|
-
selector: "function",
|
114
|
-
format: ["camelCase", "PascalCase"]
|
115
|
-
},
|
116
|
-
{
|
117
|
-
format: null,
|
118
|
-
modifiers: ["destructured"],
|
119
|
-
selector: "variable"
|
120
|
-
},
|
121
|
-
{
|
122
|
-
format: null,
|
123
|
-
selector: "objectLiteralProperty"
|
124
|
-
}
|
125
|
-
],
|
126
|
-
camelcase: "off",
|
127
|
-
"@typescript-eslint/no-base-to-string": "error",
|
128
|
-
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
129
|
-
"@typescript-eslint/no-confusing-void-expression": "error",
|
130
|
-
"@typescript-eslint/no-duplicate-enum-values": "error",
|
131
|
-
"@typescript-eslint/no-duplicate-type-constituents": "error",
|
132
|
-
"@typescript-eslint/no-dynamic-delete": "error",
|
133
|
-
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
134
|
-
"@typescript-eslint/no-extraneous-class": "error",
|
135
|
-
// "@typescript-eslint/no-floating-promises": "error",
|
136
|
-
"@typescript-eslint/no-for-in-array": "error",
|
137
|
-
"@typescript-eslint/no-import-type-side-effects": "error",
|
138
|
-
"@typescript-eslint/no-inferrable-types": "error",
|
139
|
-
"@typescript-eslint/no-invalid-void-type": "error",
|
140
|
-
"@typescript-eslint/no-meaningless-void-operator": "error",
|
141
|
-
"@typescript-eslint/no-misused-new": "error",
|
142
|
-
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
|
143
|
-
"@typescript-eslint/no-mixed-enums": "error",
|
144
|
-
"@typescript-eslint/no-namespace": "error",
|
145
|
-
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
146
|
-
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
147
|
-
"@typescript-eslint/no-non-null-assertion": "error",
|
148
|
-
"@typescript-eslint/no-redundant-type-constituents": "error",
|
149
|
-
"@typescript-eslint/no-require-imports": "error",
|
150
|
-
"@typescript-eslint/no-this-alias": "error",
|
151
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
152
|
-
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
153
|
-
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
154
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
155
|
-
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
156
|
-
"@typescript-eslint/no-unsafe-argument": "off",
|
157
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
158
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
159
|
-
"@typescript-eslint/no-unsafe-declaration-merging": "off",
|
160
|
-
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
161
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
162
|
-
"@typescript-eslint/no-unsafe-return": "off",
|
163
|
-
"@typescript-eslint/no-useless-empty-export": "error",
|
164
|
-
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
165
|
-
"@typescript-eslint/parameter-properties": "error",
|
166
|
-
"@typescript-eslint/prefer-as-const": "error",
|
167
|
-
"@typescript-eslint/prefer-enum-initializers": "error",
|
168
|
-
"@typescript-eslint/prefer-for-of": "error",
|
169
|
-
"@typescript-eslint/prefer-includes": "error",
|
170
|
-
"@typescript-eslint/prefer-literal-enum-member": "error",
|
171
|
-
"@typescript-eslint/prefer-namespace-keyword": "error",
|
172
|
-
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
173
|
-
"@typescript-eslint/prefer-optional-chain": "error",
|
174
|
-
"@typescript-eslint/prefer-readonly": "error",
|
175
|
-
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
176
|
-
"@typescript-eslint/prefer-regexp-exec": "error",
|
177
|
-
"@typescript-eslint/prefer-return-this-type": "error",
|
178
|
-
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
179
|
-
"@typescript-eslint/promise-function-async": "off",
|
180
|
-
"@typescript-eslint/restrict-plus-operands": "error",
|
181
|
-
"@typescript-eslint/sort-type-constituents": "off",
|
182
|
-
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
183
|
-
"@typescript-eslint/unbound-method": "error",
|
184
|
-
...extensionRules,
|
185
|
-
"no-duplicate-imports": ["off"]
|
186
|
-
};
|
187
|
-
|
188
|
-
/** @type {import("@stylistic/eslint-plugin").RuleOptions} */
|
189
|
-
const rules$1 = {
|
190
|
-
"perfectionist/sort-imports": [
|
191
|
-
"error",
|
192
|
-
{
|
193
|
-
type: "alphabetical",
|
194
|
-
order: "asc",
|
195
|
-
ignoreCase: true,
|
196
|
-
internalPattern: ["~/**", "@/**", "#**", "#**/**"],
|
197
|
-
newlinesBetween: "ignore",
|
198
|
-
groups: [
|
199
|
-
"builtin",
|
200
|
-
"external",
|
201
|
-
"internal",
|
202
|
-
"parent",
|
203
|
-
"sibling",
|
204
|
-
"side-effect",
|
205
|
-
"index",
|
206
|
-
"side-effect-style",
|
207
|
-
"builtin-type",
|
208
|
-
"external-type",
|
209
|
-
"internal-type",
|
210
|
-
"parent-type",
|
211
|
-
"sibling-type",
|
212
|
-
"index-type",
|
213
|
-
"object",
|
214
|
-
"unknown"
|
215
|
-
]
|
216
|
-
}
|
217
|
-
],
|
218
|
-
"perfectionist/sort-intersection-types": [
|
219
|
-
"error",
|
220
|
-
{
|
221
|
-
type: "alphabetical",
|
222
|
-
order: "asc",
|
223
|
-
ignoreCase: true,
|
224
|
-
partitionByNewLine: false,
|
225
|
-
groups: []
|
226
|
-
}
|
227
|
-
]
|
228
|
-
};
|
229
|
-
|
230
|
-
/** @type {import("@stylistic/eslint-plugin").RuleOptions} */
|
231
|
-
const rules = {
|
232
|
-
"@stylistic/type-annotation-spacing": "error",
|
233
|
-
"@stylistic/type-generic-spacing": ["error"],
|
234
|
-
"@stylistic/type-named-tuple-spacing": ["error"]
|
235
|
-
};
|
236
|
-
|
237
|
-
/** @type {import("eslint").Linter.Config} */
|
238
|
-
const config = {
|
239
|
-
plugins: {
|
240
|
-
...jsConfig.plugins,
|
241
|
-
"@typescript-eslint": typescript.plugin
|
242
|
-
},
|
243
|
-
rules: {
|
244
|
-
...jsConfig.rules,
|
245
|
-
...rules$2,
|
246
|
-
...rules,
|
247
|
-
...rules$1
|
248
|
-
}
|
249
|
-
};
|
250
|
-
|
251
|
-
module.exports = config;
|
package/dist/esm/index.js
DELETED
@@ -1,249 +0,0 @@
|
|
1
|
-
import jsConfig from '@joshuaavalon/eslint-config-javascript';
|
2
|
-
import typescript from 'typescript-eslint';
|
3
|
-
|
4
|
-
/** @type {import("eslint").Linter.RulesRecord} */
|
5
|
-
const extensionRules = {
|
6
|
-
"default-param-last": "off",
|
7
|
-
"@typescript-eslint/default-param-last": "error",
|
8
|
-
"dot-notation": "off",
|
9
|
-
"@typescript-eslint/dot-notation": "error",
|
10
|
-
"no-array-constructor": "off",
|
11
|
-
"@typescript-eslint/no-array-constructor": "error",
|
12
|
-
"no-dupe-class-members": "off",
|
13
|
-
"@typescript-eslint/no-dupe-class-members": "error",
|
14
|
-
"no-implied-eval": "off",
|
15
|
-
"@typescript-eslint/no-implied-eval": "error",
|
16
|
-
"no-loop-func": "off",
|
17
|
-
"@typescript-eslint/no-loop-func": "error",
|
18
|
-
"no-redeclare": "off",
|
19
|
-
"@typescript-eslint/no-redeclare": "error",
|
20
|
-
"no-throw-literal": "off",
|
21
|
-
"@typescript-eslint/only-throw-error": "error",
|
22
|
-
"no-unused-expressions": "off",
|
23
|
-
"@typescript-eslint/no-unused-expressions": "error",
|
24
|
-
"no-unused-vars": "off",
|
25
|
-
"@typescript-eslint/no-unused-vars": ["error",
|
26
|
-
{
|
27
|
-
args: "all",
|
28
|
-
argsIgnorePattern: "^_",
|
29
|
-
caughtErrors: "all",
|
30
|
-
caughtErrorsIgnorePattern: "^_",
|
31
|
-
destructuredArrayIgnorePattern: "^_",
|
32
|
-
varsIgnorePattern: "^_",
|
33
|
-
ignoreRestSiblings: true
|
34
|
-
}],
|
35
|
-
"no-use-before-define": "off",
|
36
|
-
"@typescript-eslint/no-use-before-define": "error",
|
37
|
-
"no-useless-constructor": "off",
|
38
|
-
"@typescript-eslint/no-useless-constructor": "error",
|
39
|
-
"require-await": "off",
|
40
|
-
"@typescript-eslint/require-await": "off",
|
41
|
-
"no-return-await": "off",
|
42
|
-
"@typescript-eslint/return-await": ["error", "always"]
|
43
|
-
};
|
44
|
-
|
45
|
-
/** @type {import("eslint").Linter.RulesRecord} */
|
46
|
-
const rules$2 = {
|
47
|
-
"constructor-super": "off",
|
48
|
-
"no-invalid-this": "off",
|
49
|
-
"no-undef": "off",
|
50
|
-
"no-const-assign": "off",
|
51
|
-
"no-this-before-super": "off",
|
52
|
-
"no-dupe-args": "off",
|
53
|
-
"no-unreachable": "off",
|
54
|
-
"getter-return": "off",
|
55
|
-
"no-dupe-keys": "off",
|
56
|
-
"no-func-assign": "off",
|
57
|
-
"no-dupe-class-members": "off",
|
58
|
-
"no-obj-calls": "off",
|
59
|
-
"no-setter-return": "off",
|
60
|
-
"no-unsafe-negation": "off",
|
61
|
-
"no-import-assign": "off",
|
62
|
-
"@typescript-eslint/adjacent-overload-signatures": "error",
|
63
|
-
"@typescript-eslint/array-type": "error",
|
64
|
-
"@typescript-eslint/await-thenable": "error",
|
65
|
-
"@typescript-eslint/no-empty-object-type": ["error",
|
66
|
-
{
|
67
|
-
allowInterfaces: "always",
|
68
|
-
allowObjectTypes: "always"
|
69
|
-
}],
|
70
|
-
"@typescript-eslint/no-unsafe-function-type": "error",
|
71
|
-
"@typescript-eslint/no-wrapper-object-types": "error",
|
72
|
-
"@typescript-eslint/consistent-generic-constructors": "error",
|
73
|
-
"@typescript-eslint/consistent-type-exports": "error",
|
74
|
-
"@typescript-eslint/consistent-type-imports": "error",
|
75
|
-
"@typescript-eslint/explicit-function-return-type": [
|
76
|
-
"error",
|
77
|
-
{
|
78
|
-
allowExpressions: true,
|
79
|
-
allowTypedFunctionExpressions: true,
|
80
|
-
allowHigherOrderFunctions: true,
|
81
|
-
allowDirectConstAssertionInArrowFunctions: true
|
82
|
-
}
|
83
|
-
],
|
84
|
-
"@typescript-eslint/explicit-member-accessibility": "error",
|
85
|
-
"@typescript-eslint/explicit-module-boundary-types": "error",
|
86
|
-
"@typescript-eslint/naming-convention": [
|
87
|
-
"error",
|
88
|
-
{
|
89
|
-
format: ["camelCase"],
|
90
|
-
leadingUnderscore: "allow",
|
91
|
-
selector: "default"
|
92
|
-
},
|
93
|
-
{
|
94
|
-
format: [
|
95
|
-
"camelCase",
|
96
|
-
"UPPER_CASE",
|
97
|
-
"PascalCase"
|
98
|
-
],
|
99
|
-
leadingUnderscore: "allow",
|
100
|
-
selector: "variable"
|
101
|
-
},
|
102
|
-
{
|
103
|
-
selector: "typeLike",
|
104
|
-
format: ["PascalCase"]
|
105
|
-
},
|
106
|
-
{
|
107
|
-
selector: "import",
|
108
|
-
format: ["camelCase", "PascalCase"]
|
109
|
-
},
|
110
|
-
{
|
111
|
-
selector: "function",
|
112
|
-
format: ["camelCase", "PascalCase"]
|
113
|
-
},
|
114
|
-
{
|
115
|
-
format: null,
|
116
|
-
modifiers: ["destructured"],
|
117
|
-
selector: "variable"
|
118
|
-
},
|
119
|
-
{
|
120
|
-
format: null,
|
121
|
-
selector: "objectLiteralProperty"
|
122
|
-
}
|
123
|
-
],
|
124
|
-
camelcase: "off",
|
125
|
-
"@typescript-eslint/no-base-to-string": "error",
|
126
|
-
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
127
|
-
"@typescript-eslint/no-confusing-void-expression": "error",
|
128
|
-
"@typescript-eslint/no-duplicate-enum-values": "error",
|
129
|
-
"@typescript-eslint/no-duplicate-type-constituents": "error",
|
130
|
-
"@typescript-eslint/no-dynamic-delete": "error",
|
131
|
-
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
132
|
-
"@typescript-eslint/no-extraneous-class": "error",
|
133
|
-
// "@typescript-eslint/no-floating-promises": "error",
|
134
|
-
"@typescript-eslint/no-for-in-array": "error",
|
135
|
-
"@typescript-eslint/no-import-type-side-effects": "error",
|
136
|
-
"@typescript-eslint/no-inferrable-types": "error",
|
137
|
-
"@typescript-eslint/no-invalid-void-type": "error",
|
138
|
-
"@typescript-eslint/no-meaningless-void-operator": "error",
|
139
|
-
"@typescript-eslint/no-misused-new": "error",
|
140
|
-
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
|
141
|
-
"@typescript-eslint/no-mixed-enums": "error",
|
142
|
-
"@typescript-eslint/no-namespace": "error",
|
143
|
-
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
144
|
-
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
145
|
-
"@typescript-eslint/no-non-null-assertion": "error",
|
146
|
-
"@typescript-eslint/no-redundant-type-constituents": "error",
|
147
|
-
"@typescript-eslint/no-require-imports": "error",
|
148
|
-
"@typescript-eslint/no-this-alias": "error",
|
149
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
150
|
-
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
151
|
-
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
152
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
153
|
-
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
154
|
-
"@typescript-eslint/no-unsafe-argument": "off",
|
155
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
156
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
157
|
-
"@typescript-eslint/no-unsafe-declaration-merging": "off",
|
158
|
-
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
159
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
160
|
-
"@typescript-eslint/no-unsafe-return": "off",
|
161
|
-
"@typescript-eslint/no-useless-empty-export": "error",
|
162
|
-
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
163
|
-
"@typescript-eslint/parameter-properties": "error",
|
164
|
-
"@typescript-eslint/prefer-as-const": "error",
|
165
|
-
"@typescript-eslint/prefer-enum-initializers": "error",
|
166
|
-
"@typescript-eslint/prefer-for-of": "error",
|
167
|
-
"@typescript-eslint/prefer-includes": "error",
|
168
|
-
"@typescript-eslint/prefer-literal-enum-member": "error",
|
169
|
-
"@typescript-eslint/prefer-namespace-keyword": "error",
|
170
|
-
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
171
|
-
"@typescript-eslint/prefer-optional-chain": "error",
|
172
|
-
"@typescript-eslint/prefer-readonly": "error",
|
173
|
-
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
174
|
-
"@typescript-eslint/prefer-regexp-exec": "error",
|
175
|
-
"@typescript-eslint/prefer-return-this-type": "error",
|
176
|
-
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
177
|
-
"@typescript-eslint/promise-function-async": "off",
|
178
|
-
"@typescript-eslint/restrict-plus-operands": "error",
|
179
|
-
"@typescript-eslint/sort-type-constituents": "off",
|
180
|
-
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
181
|
-
"@typescript-eslint/unbound-method": "error",
|
182
|
-
...extensionRules,
|
183
|
-
"no-duplicate-imports": ["off"]
|
184
|
-
};
|
185
|
-
|
186
|
-
/** @type {import("@stylistic/eslint-plugin").RuleOptions} */
|
187
|
-
const rules$1 = {
|
188
|
-
"perfectionist/sort-imports": [
|
189
|
-
"error",
|
190
|
-
{
|
191
|
-
type: "alphabetical",
|
192
|
-
order: "asc",
|
193
|
-
ignoreCase: true,
|
194
|
-
internalPattern: ["~/**", "@/**", "#**", "#**/**"],
|
195
|
-
newlinesBetween: "ignore",
|
196
|
-
groups: [
|
197
|
-
"builtin",
|
198
|
-
"external",
|
199
|
-
"internal",
|
200
|
-
"parent",
|
201
|
-
"sibling",
|
202
|
-
"side-effect",
|
203
|
-
"index",
|
204
|
-
"side-effect-style",
|
205
|
-
"builtin-type",
|
206
|
-
"external-type",
|
207
|
-
"internal-type",
|
208
|
-
"parent-type",
|
209
|
-
"sibling-type",
|
210
|
-
"index-type",
|
211
|
-
"object",
|
212
|
-
"unknown"
|
213
|
-
]
|
214
|
-
}
|
215
|
-
],
|
216
|
-
"perfectionist/sort-intersection-types": [
|
217
|
-
"error",
|
218
|
-
{
|
219
|
-
type: "alphabetical",
|
220
|
-
order: "asc",
|
221
|
-
ignoreCase: true,
|
222
|
-
partitionByNewLine: false,
|
223
|
-
groups: []
|
224
|
-
}
|
225
|
-
]
|
226
|
-
};
|
227
|
-
|
228
|
-
/** @type {import("@stylistic/eslint-plugin").RuleOptions} */
|
229
|
-
const rules = {
|
230
|
-
"@stylistic/type-annotation-spacing": "error",
|
231
|
-
"@stylistic/type-generic-spacing": ["error"],
|
232
|
-
"@stylistic/type-named-tuple-spacing": ["error"]
|
233
|
-
};
|
234
|
-
|
235
|
-
/** @type {import("eslint").Linter.Config} */
|
236
|
-
const config = {
|
237
|
-
plugins: {
|
238
|
-
...jsConfig.plugins,
|
239
|
-
"@typescript-eslint": typescript.plugin
|
240
|
-
},
|
241
|
-
rules: {
|
242
|
-
...jsConfig.rules,
|
243
|
-
...rules$2,
|
244
|
-
...rules,
|
245
|
-
...rules$1
|
246
|
-
}
|
247
|
-
};
|
248
|
-
|
249
|
-
export { config as default };
|