@debbl/eslint-config 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.cjs +6 -22
- package/dist/index.js +6 -22
- package/package.json +1 -2
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -206,21 +206,14 @@ async function interopDefault(m) {
|
|
|
206
206
|
|
|
207
207
|
// src/configs/imports.ts
|
|
208
208
|
async function imports() {
|
|
209
|
-
const
|
|
210
|
-
interopDefault(import("eslint-plugin-antfu")),
|
|
211
|
-
// @ts-expect-error missing types
|
|
212
|
-
interopDefault(import("eslint-plugin-i"))
|
|
213
|
-
]);
|
|
209
|
+
const pluginImport = await interopDefault(import("eslint-plugin-i"));
|
|
214
210
|
return [
|
|
215
211
|
{
|
|
216
212
|
name: "eslint:imports",
|
|
217
213
|
plugins: {
|
|
218
|
-
antfu: pluginAntfu,
|
|
219
214
|
import: pluginImport
|
|
220
215
|
},
|
|
221
216
|
rules: {
|
|
222
|
-
"antfu/import-dedupe": "error",
|
|
223
|
-
"antfu/no-import-node-modules-by-path": "error",
|
|
224
217
|
"import/first": "error",
|
|
225
218
|
"import/no-duplicates": "error",
|
|
226
219
|
"import/no-mutable-exports": "error",
|
|
@@ -240,11 +233,10 @@ async function imports() {
|
|
|
240
233
|
// src/configs/javascript.ts
|
|
241
234
|
var import_globals = __toESM(require("globals"), 1);
|
|
242
235
|
async function javascript() {
|
|
243
|
-
const
|
|
244
|
-
interopDefault(import("eslint-plugin-antfu")),
|
|
236
|
+
const pluginUnusedImports = await interopDefault(
|
|
245
237
|
// @ts-expect-error missing types
|
|
246
|
-
|
|
247
|
-
|
|
238
|
+
import("eslint-plugin-unused-imports")
|
|
239
|
+
);
|
|
248
240
|
return [
|
|
249
241
|
{
|
|
250
242
|
name: "eslint:javascript",
|
|
@@ -271,7 +263,6 @@ async function javascript() {
|
|
|
271
263
|
reportUnusedDisableDirectives: true
|
|
272
264
|
},
|
|
273
265
|
plugins: {
|
|
274
|
-
"antfu": pluginAntfu,
|
|
275
266
|
"unused-imports": pluginUnusedImports
|
|
276
267
|
},
|
|
277
268
|
rules: {
|
|
@@ -634,8 +625,6 @@ async function markdown(options = {}) {
|
|
|
634
625
|
}
|
|
635
626
|
},
|
|
636
627
|
rules: {
|
|
637
|
-
"antfu/no-cjs-exports": "off",
|
|
638
|
-
"antfu/no-ts-export-equal": "off",
|
|
639
628
|
"no-alert": "off",
|
|
640
629
|
"no-console": "off",
|
|
641
630
|
"no-undef": "off",
|
|
@@ -941,17 +930,15 @@ async function typescript(options) {
|
|
|
941
930
|
parserOptions = {},
|
|
942
931
|
tsconfigPath
|
|
943
932
|
} = options ?? {};
|
|
944
|
-
const [pluginTs, parserTs
|
|
933
|
+
const [pluginTs, parserTs] = await Promise.all([
|
|
945
934
|
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
946
|
-
interopDefault(import("@typescript-eslint/parser"))
|
|
947
|
-
interopDefault(import("eslint-plugin-antfu"))
|
|
935
|
+
interopDefault(import("@typescript-eslint/parser"))
|
|
948
936
|
]);
|
|
949
937
|
return [
|
|
950
938
|
{
|
|
951
939
|
// Install the plugins without globs, so they can be configured separately.
|
|
952
940
|
name: "eslint:typescript:setup",
|
|
953
941
|
plugins: {
|
|
954
|
-
"antfu": pluginAntfu,
|
|
955
942
|
"@typescript-eslint": pluginTs
|
|
956
943
|
}
|
|
957
944
|
},
|
|
@@ -973,9 +960,6 @@ async function typescript(options) {
|
|
|
973
960
|
rules: {
|
|
974
961
|
...pluginTs.configs["eslint-recommended"].overrides[0].rules,
|
|
975
962
|
...pluginTs.configs.strict.rules,
|
|
976
|
-
"antfu/generic-spacing": "error",
|
|
977
|
-
"antfu/named-tuple-spacing": "error",
|
|
978
|
-
"antfu/no-cjs-exports": "error",
|
|
979
963
|
"no-dupe-class-members": "off",
|
|
980
964
|
"no-invalid-this": "off",
|
|
981
965
|
"no-loss-of-precision": "off",
|
package/dist/index.js
CHANGED
|
@@ -128,21 +128,14 @@ async function interopDefault(m) {
|
|
|
128
128
|
|
|
129
129
|
// src/configs/imports.ts
|
|
130
130
|
async function imports() {
|
|
131
|
-
const
|
|
132
|
-
interopDefault(import("eslint-plugin-antfu")),
|
|
133
|
-
// @ts-expect-error missing types
|
|
134
|
-
interopDefault(import("eslint-plugin-i"))
|
|
135
|
-
]);
|
|
131
|
+
const pluginImport = await interopDefault(import("eslint-plugin-i"));
|
|
136
132
|
return [
|
|
137
133
|
{
|
|
138
134
|
name: "eslint:imports",
|
|
139
135
|
plugins: {
|
|
140
|
-
antfu: pluginAntfu,
|
|
141
136
|
import: pluginImport
|
|
142
137
|
},
|
|
143
138
|
rules: {
|
|
144
|
-
"antfu/import-dedupe": "error",
|
|
145
|
-
"antfu/no-import-node-modules-by-path": "error",
|
|
146
139
|
"import/first": "error",
|
|
147
140
|
"import/no-duplicates": "error",
|
|
148
141
|
"import/no-mutable-exports": "error",
|
|
@@ -162,11 +155,10 @@ async function imports() {
|
|
|
162
155
|
// src/configs/javascript.ts
|
|
163
156
|
import globals from "globals";
|
|
164
157
|
async function javascript() {
|
|
165
|
-
const
|
|
166
|
-
interopDefault(import("eslint-plugin-antfu")),
|
|
158
|
+
const pluginUnusedImports = await interopDefault(
|
|
167
159
|
// @ts-expect-error missing types
|
|
168
|
-
|
|
169
|
-
|
|
160
|
+
import("eslint-plugin-unused-imports")
|
|
161
|
+
);
|
|
170
162
|
return [
|
|
171
163
|
{
|
|
172
164
|
name: "eslint:javascript",
|
|
@@ -193,7 +185,6 @@ async function javascript() {
|
|
|
193
185
|
reportUnusedDisableDirectives: true
|
|
194
186
|
},
|
|
195
187
|
plugins: {
|
|
196
|
-
"antfu": pluginAntfu,
|
|
197
188
|
"unused-imports": pluginUnusedImports
|
|
198
189
|
},
|
|
199
190
|
rules: {
|
|
@@ -556,8 +547,6 @@ async function markdown(options = {}) {
|
|
|
556
547
|
}
|
|
557
548
|
},
|
|
558
549
|
rules: {
|
|
559
|
-
"antfu/no-cjs-exports": "off",
|
|
560
|
-
"antfu/no-ts-export-equal": "off",
|
|
561
550
|
"no-alert": "off",
|
|
562
551
|
"no-console": "off",
|
|
563
552
|
"no-undef": "off",
|
|
@@ -863,17 +852,15 @@ async function typescript(options) {
|
|
|
863
852
|
parserOptions = {},
|
|
864
853
|
tsconfigPath
|
|
865
854
|
} = options ?? {};
|
|
866
|
-
const [pluginTs, parserTs
|
|
855
|
+
const [pluginTs, parserTs] = await Promise.all([
|
|
867
856
|
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
868
|
-
interopDefault(import("@typescript-eslint/parser"))
|
|
869
|
-
interopDefault(import("eslint-plugin-antfu"))
|
|
857
|
+
interopDefault(import("@typescript-eslint/parser"))
|
|
870
858
|
]);
|
|
871
859
|
return [
|
|
872
860
|
{
|
|
873
861
|
// Install the plugins without globs, so they can be configured separately.
|
|
874
862
|
name: "eslint:typescript:setup",
|
|
875
863
|
plugins: {
|
|
876
|
-
"antfu": pluginAntfu,
|
|
877
864
|
"@typescript-eslint": pluginTs
|
|
878
865
|
}
|
|
879
866
|
},
|
|
@@ -895,9 +882,6 @@ async function typescript(options) {
|
|
|
895
882
|
rules: {
|
|
896
883
|
...pluginTs.configs["eslint-recommended"].overrides[0].rules,
|
|
897
884
|
...pluginTs.configs.strict.rules,
|
|
898
|
-
"antfu/generic-spacing": "error",
|
|
899
|
-
"antfu/named-tuple-spacing": "error",
|
|
900
|
-
"antfu/no-cjs-exports": "error",
|
|
901
885
|
"no-dupe-class-members": "off",
|
|
902
886
|
"no-invalid-this": "off",
|
|
903
887
|
"no-loss-of-precision": "off",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debbl/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.2",
|
|
5
5
|
"packageManager": "pnpm@8.11.0",
|
|
6
6
|
"description": "Brendan Dash's ESLint config",
|
|
7
7
|
"author": "Debbl <me@aiwan.run> (https://github.com/Debbl/)",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"eslint-config-prettier": "^9.1.0",
|
|
34
34
|
"eslint-define-config": "^2.0.0",
|
|
35
35
|
"eslint-mdx": "^2.2.0",
|
|
36
|
-
"eslint-plugin-antfu": "^2.0.0",
|
|
37
36
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
38
37
|
"eslint-plugin-i": "^2.29.0",
|
|
39
38
|
"eslint-plugin-jsdoc": "^46.9.0",
|