@lichthagel/eslint-config 1.0.31 → 1.0.33
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/dist/index.cjs +24 -39
- package/dist/index.d.cts +2193 -1610
- package/dist/{index.d.ts → index.d.mts} +2193 -1610
- package/dist/{index.js → index.mjs} +8 -25
- package/package.json +13 -13
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
//#region \0rolldown/runtime.js
|
|
3
6
|
var __create = Object.create;
|
|
4
7
|
var __defProp = Object.defineProperty;
|
|
5
8
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -20,21 +23,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
20
23
|
value: mod,
|
|
21
24
|
enumerable: true
|
|
22
25
|
}) : target, mod));
|
|
23
|
-
|
|
24
26
|
//#endregion
|
|
25
27
|
let globals = require("globals");
|
|
26
28
|
globals = __toESM(globals);
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
+
let _eslint_js = require("@eslint/js");
|
|
30
|
+
_eslint_js = __toESM(_eslint_js);
|
|
29
31
|
let eslint_plugin_perfectionist = require("eslint-plugin-perfectionist");
|
|
30
32
|
eslint_plugin_perfectionist = __toESM(eslint_plugin_perfectionist);
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
+
let _stylistic_eslint_plugin = require("@stylistic/eslint-plugin");
|
|
34
|
+
_stylistic_eslint_plugin = __toESM(_stylistic_eslint_plugin);
|
|
33
35
|
let typescript_eslint = require("typescript-eslint");
|
|
34
36
|
typescript_eslint = __toESM(typescript_eslint);
|
|
35
37
|
let eslint_plugin_unicorn = require("eslint-plugin-unicorn");
|
|
36
38
|
eslint_plugin_unicorn = __toESM(eslint_plugin_unicorn);
|
|
37
|
-
|
|
38
39
|
//#region src/configs/browser.ts
|
|
39
40
|
var browser_default = [{
|
|
40
41
|
name: "lichthagel/browser",
|
|
@@ -45,12 +46,11 @@ var browser_default = [{
|
|
|
45
46
|
window: "readonly"
|
|
46
47
|
} }
|
|
47
48
|
}];
|
|
48
|
-
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/configs/javascript.ts
|
|
51
51
|
var javascript_default = [{
|
|
52
52
|
name: "js/recommended",
|
|
53
|
-
...
|
|
53
|
+
..._eslint_js.default.configs.recommended
|
|
54
54
|
}, {
|
|
55
55
|
name: "lichthagel/javascript",
|
|
56
56
|
languageOptions: {
|
|
@@ -195,7 +195,6 @@ var javascript_default = [{
|
|
|
195
195
|
"yoda": "error"
|
|
196
196
|
}
|
|
197
197
|
}];
|
|
198
|
-
|
|
199
198
|
//#endregion
|
|
200
199
|
//#region src/configs/node.ts
|
|
201
200
|
const node = async () => {
|
|
@@ -212,8 +211,6 @@ const node = async () => {
|
|
|
212
211
|
}
|
|
213
212
|
}];
|
|
214
213
|
};
|
|
215
|
-
var node_default = node;
|
|
216
|
-
|
|
217
214
|
//#endregion
|
|
218
215
|
//#region src/configs/perfectionist.ts
|
|
219
216
|
var perfectionist_default = [{
|
|
@@ -253,7 +250,6 @@ var perfectionist_default = [{
|
|
|
253
250
|
"sort-imports": "off"
|
|
254
251
|
}
|
|
255
252
|
}];
|
|
256
|
-
|
|
257
253
|
//#endregion
|
|
258
254
|
//#region src/configs/solid.ts
|
|
259
255
|
const solid = async (options = {}) => {
|
|
@@ -265,13 +261,11 @@ const solid = async (options = {}) => {
|
|
|
265
261
|
...configSolid
|
|
266
262
|
}];
|
|
267
263
|
};
|
|
268
|
-
var solid_default = solid;
|
|
269
|
-
|
|
270
264
|
//#endregion
|
|
271
265
|
//#region src/configs/stylistic.ts
|
|
272
266
|
var stylistic_default = [{
|
|
273
267
|
name: "stylistic/custom",
|
|
274
|
-
...
|
|
268
|
+
..._stylistic_eslint_plugin.default.configs.customize({
|
|
275
269
|
arrowParens: true,
|
|
276
270
|
braceStyle: "1tbs",
|
|
277
271
|
commaDangle: "always-multiline",
|
|
@@ -347,7 +341,6 @@ var stylistic_default = [{
|
|
|
347
341
|
"@stylistic/jsx-self-closing-comp": "error"
|
|
348
342
|
}
|
|
349
343
|
}];
|
|
350
|
-
|
|
351
344
|
//#endregion
|
|
352
345
|
//#region src/configs/svelte.ts
|
|
353
346
|
const SVELTE_FILES = ["**/*.svelte"];
|
|
@@ -413,8 +406,6 @@ const svelte = async (options = {}) => {
|
|
|
413
406
|
}
|
|
414
407
|
}];
|
|
415
408
|
};
|
|
416
|
-
var svelte_default = svelte;
|
|
417
|
-
|
|
418
409
|
//#endregion
|
|
419
410
|
//#region src/configs/tailwindcss.ts
|
|
420
411
|
const tailwindcss = async () => {
|
|
@@ -435,8 +426,6 @@ const tailwindcss = async () => {
|
|
|
435
426
|
}
|
|
436
427
|
}];
|
|
437
428
|
};
|
|
438
|
-
var tailwindcss_default = tailwindcss;
|
|
439
|
-
|
|
440
429
|
//#endregion
|
|
441
430
|
//#region src/configs/typescript.ts
|
|
442
431
|
var typescript_default = [...typescript_eslint.default.configs.recommendedTypeChecked, {
|
|
@@ -459,7 +448,6 @@ var typescript_default = [...typescript_eslint.default.configs.recommendedTypeCh
|
|
|
459
448
|
"default-param-last": "off"
|
|
460
449
|
}
|
|
461
450
|
}];
|
|
462
|
-
|
|
463
451
|
//#endregion
|
|
464
452
|
//#region src/configs/unicorn.ts
|
|
465
453
|
var unicorn_default = [{
|
|
@@ -480,7 +468,6 @@ var unicorn_default = [{
|
|
|
480
468
|
"unicorn/prevent-abbreviations": "off"
|
|
481
469
|
}
|
|
482
470
|
}];
|
|
483
|
-
|
|
484
471
|
//#endregion
|
|
485
472
|
//#region src/factory.ts
|
|
486
473
|
/**
|
|
@@ -490,36 +477,34 @@ var unicorn_default = [{
|
|
|
490
477
|
* @returns An array of ESLint flat config items.
|
|
491
478
|
*/
|
|
492
479
|
const lichthagel = async (options = {}) => {
|
|
493
|
-
const { browser = false, node: node$1 = false, solid: solid$1 = false, stylistic
|
|
480
|
+
const { browser = false, node: node$1 = false, solid: solid$1 = false, stylistic = true, svelte: svelte$1 = false, tailwindcss: tailwindcss$1 = false, typescript = true, ...rest } = options;
|
|
494
481
|
if (Object.keys(rest).length > 0) throw new Error(`Unknown options: ${Object.keys(rest).join(", ")}`);
|
|
495
482
|
const config = [
|
|
496
483
|
...javascript_default,
|
|
497
484
|
...unicorn_default,
|
|
498
485
|
...perfectionist_default
|
|
499
486
|
];
|
|
500
|
-
if (stylistic
|
|
487
|
+
if (stylistic) config.push(...stylistic_default);
|
|
501
488
|
if (browser) config.push(...browser_default);
|
|
502
|
-
if (node$1) config.push(...await
|
|
489
|
+
if (node$1) config.push(...await node());
|
|
503
490
|
if (typescript) config.push(...typescript_default);
|
|
504
|
-
if (solid$1) config.push(...await
|
|
505
|
-
if (svelte$1) config.push(...await
|
|
506
|
-
disableStylistic: stylistic
|
|
491
|
+
if (solid$1) config.push(...await solid({ withTypescript: typescript }));
|
|
492
|
+
if (svelte$1) config.push(...await svelte({
|
|
493
|
+
disableStylistic: stylistic,
|
|
507
494
|
withTypescript: typescript
|
|
508
495
|
}));
|
|
509
|
-
if (tailwindcss$1) config.push(...await
|
|
496
|
+
if (tailwindcss$1) config.push(...await tailwindcss());
|
|
510
497
|
return config;
|
|
511
498
|
};
|
|
512
|
-
var factory_default = lichthagel;
|
|
513
|
-
|
|
514
499
|
//#endregion
|
|
515
500
|
exports.browser = browser_default;
|
|
516
|
-
exports.default =
|
|
501
|
+
exports.default = lichthagel;
|
|
517
502
|
exports.javascript = javascript_default;
|
|
518
|
-
exports.node =
|
|
503
|
+
exports.node = node;
|
|
519
504
|
exports.perfectionist = perfectionist_default;
|
|
520
|
-
exports.solid =
|
|
505
|
+
exports.solid = solid;
|
|
521
506
|
exports.stylistic = stylistic_default;
|
|
522
|
-
exports.svelte =
|
|
523
|
-
exports.tailwindcss =
|
|
507
|
+
exports.svelte = svelte;
|
|
508
|
+
exports.tailwindcss = tailwindcss;
|
|
524
509
|
exports.typescript = typescript_default;
|
|
525
|
-
exports.unicorn = unicorn_default;
|
|
510
|
+
exports.unicorn = unicorn_default;
|