@luxass/eslint-config 4.0.1 → 4.2.0-beta.0
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 +0 -3
- package/dist/chunk-C5YCKPY4.mjs +274 -0
- package/dist/{chunk-VZ2YFMWH.mjs → chunk-C67L5T23.mjs} +5 -2
- package/dist/{chunk-7R4FYLS2.mjs → chunk-K6TLNQJF.mjs} +1 -4
- package/dist/configs/astro.d.cts +1 -1
- package/dist/configs/astro.d.ts +1 -1
- package/dist/configs/comments.d.cts +1 -1
- package/dist/configs/comments.d.ts +1 -1
- package/dist/configs/formatters.d.cts +1 -1
- package/dist/configs/formatters.d.ts +1 -1
- package/dist/configs/ignores.d.cts +1 -1
- package/dist/configs/ignores.d.ts +1 -1
- package/dist/configs/imports.d.cts +1 -1
- package/dist/configs/imports.d.ts +1 -1
- package/dist/configs/index.cjs +5 -6
- package/dist/configs/index.d.cts +1 -1
- package/dist/configs/index.d.ts +1 -1
- package/dist/configs/index.mjs +5 -5
- package/dist/configs/javascript.cjs +1 -4
- package/dist/configs/javascript.d.cts +1 -1
- package/dist/configs/javascript.d.ts +1 -1
- package/dist/configs/javascript.mjs +1 -1
- package/dist/configs/jsdoc.d.cts +1 -1
- package/dist/configs/jsdoc.d.ts +1 -1
- package/dist/configs/jsonc.d.cts +1 -1
- package/dist/configs/jsonc.d.ts +1 -1
- package/dist/configs/markdown.d.cts +2 -2
- package/dist/configs/markdown.d.ts +2 -2
- package/dist/configs/nextjs.d.cts +1 -1
- package/dist/configs/nextjs.d.ts +1 -1
- package/dist/configs/node.d.cts +1 -1
- package/dist/configs/node.d.ts +1 -1
- package/dist/configs/perfectionist.d.cts +1 -1
- package/dist/configs/perfectionist.d.ts +1 -1
- package/dist/configs/react.d.cts +1 -1
- package/dist/configs/react.d.ts +1 -1
- package/dist/configs/solid.cjs +360 -0
- package/dist/configs/solid.d.cts +11 -0
- package/dist/configs/solid.d.ts +11 -0
- package/dist/configs/solid.mjs +8 -0
- package/dist/configs/sort.d.cts +1 -1
- package/dist/configs/sort.d.ts +1 -1
- package/dist/configs/stylistic.d.cts +1 -1
- package/dist/configs/stylistic.d.ts +1 -1
- package/dist/configs/tailwindcss.d.cts +1 -1
- package/dist/configs/tailwindcss.d.ts +1 -1
- package/dist/configs/test.d.cts +1 -1
- package/dist/configs/test.d.ts +1 -1
- package/dist/configs/toml.d.cts +1 -1
- package/dist/configs/toml.d.ts +1 -1
- package/dist/configs/typescript.d.cts +1 -1
- package/dist/configs/typescript.d.ts +1 -1
- package/dist/configs/unicorn.d.cts +1 -1
- package/dist/configs/unicorn.d.ts +1 -1
- package/dist/configs/unocss.d.cts +1 -1
- package/dist/configs/unocss.d.ts +1 -1
- package/dist/configs/vue.cjs +29 -2
- package/dist/configs/vue.d.cts +1 -1
- package/dist/configs/vue.d.ts +1 -1
- package/dist/configs/vue.mjs +1 -1
- package/dist/configs/yaml.d.cts +1 -1
- package/dist/configs/yaml.d.ts +1 -1
- package/dist/index.cjs +293 -14
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +34 -13
- package/dist/{types-spTEGSaV.d.cts → types-A-NO9UF1.d.cts} +52 -16
- package/dist/{types-spTEGSaV.d.ts → types-A-NO9UF1.d.ts} +52 -16
- package/package.json +29 -21
package/dist/index.cjs
CHANGED
|
@@ -576,10 +576,7 @@ async function javascript(options = {}) {
|
|
|
576
576
|
"no-class-assign": "error",
|
|
577
577
|
"no-compare-neg-zero": "error",
|
|
578
578
|
"no-cond-assign": ["error", "always"],
|
|
579
|
-
"no-console": [
|
|
580
|
-
editor ? "off" : "error",
|
|
581
|
-
{ allow: ["warn", "error"] }
|
|
582
|
-
],
|
|
579
|
+
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
583
580
|
"no-const-assign": "error",
|
|
584
581
|
"no-control-regex": "error",
|
|
585
582
|
"no-debugger": "error",
|
|
@@ -1299,11 +1296,14 @@ async function typescript(options = {}) {
|
|
|
1299
1296
|
var import_eslint_merge_processors2 = require("eslint-merge-processors");
|
|
1300
1297
|
async function vue(options = {}) {
|
|
1301
1298
|
const {
|
|
1302
|
-
a11y =
|
|
1299
|
+
a11y = false,
|
|
1303
1300
|
files = [GLOB_VUE],
|
|
1304
1301
|
overrides = {},
|
|
1305
1302
|
stylistic: stylistic2 = true
|
|
1306
1303
|
} = options;
|
|
1304
|
+
if (a11y) {
|
|
1305
|
+
await ensure(["eslint-plugin-vuejs-accessibility"]);
|
|
1306
|
+
}
|
|
1307
1307
|
const [
|
|
1308
1308
|
pluginVue,
|
|
1309
1309
|
parserVue,
|
|
@@ -1386,7 +1386,6 @@ async function vue(options = {}) {
|
|
|
1386
1386
|
"vue/multi-word-component-names": "off",
|
|
1387
1387
|
"vue/no-dupe-keys": "off",
|
|
1388
1388
|
"vue/no-empty-pattern": "error",
|
|
1389
|
-
"vue/no-extra-parens": ["error", "functions"],
|
|
1390
1389
|
"vue/no-irregular-whitespace": "error",
|
|
1391
1390
|
"vue/no-loss-of-precision": "error",
|
|
1392
1391
|
"vue/no-restricted-syntax": [
|
|
@@ -2448,6 +2447,268 @@ async function toml(options = {}) {
|
|
|
2448
2447
|
];
|
|
2449
2448
|
}
|
|
2450
2449
|
|
|
2450
|
+
// src/configs/solid.ts
|
|
2451
|
+
async function solid(options = {}) {
|
|
2452
|
+
const {
|
|
2453
|
+
a11y = false,
|
|
2454
|
+
files = [GLOB_JSX, GLOB_TSX],
|
|
2455
|
+
overrides = {},
|
|
2456
|
+
typescript: typescript2 = true
|
|
2457
|
+
} = options;
|
|
2458
|
+
await ensure([
|
|
2459
|
+
"eslint-plugin-solid"
|
|
2460
|
+
]);
|
|
2461
|
+
const [
|
|
2462
|
+
pluginSolid
|
|
2463
|
+
] = await Promise.all([
|
|
2464
|
+
interop(import("eslint-plugin-solid"))
|
|
2465
|
+
]);
|
|
2466
|
+
return [
|
|
2467
|
+
{
|
|
2468
|
+
name: "luxass:solid:setup",
|
|
2469
|
+
plugins: {
|
|
2470
|
+
solid: pluginSolid
|
|
2471
|
+
}
|
|
2472
|
+
},
|
|
2473
|
+
{
|
|
2474
|
+
name: "luxass:solid:rules",
|
|
2475
|
+
files,
|
|
2476
|
+
languageOptions: {
|
|
2477
|
+
parserOptions: {
|
|
2478
|
+
ecmaFeatures: {
|
|
2479
|
+
jsx: true
|
|
2480
|
+
}
|
|
2481
|
+
},
|
|
2482
|
+
sourceType: "module"
|
|
2483
|
+
},
|
|
2484
|
+
rules: {
|
|
2485
|
+
...a11y ? {
|
|
2486
|
+
// recommended rules for jsx-a11y
|
|
2487
|
+
"jsx-a11y/alt-text": "error",
|
|
2488
|
+
"jsx-a11y/anchor-ambiguous-text": "off",
|
|
2489
|
+
"jsx-a11y/anchor-has-content": "error",
|
|
2490
|
+
"jsx-a11y/anchor-is-valid": "error",
|
|
2491
|
+
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
2492
|
+
"jsx-a11y/aria-props": "error",
|
|
2493
|
+
"jsx-a11y/aria-proptypes": "error",
|
|
2494
|
+
"jsx-a11y/aria-role": "error",
|
|
2495
|
+
"jsx-a11y/aria-unsupported-elements": "error",
|
|
2496
|
+
"jsx-a11y/autocomplete-valid": "error",
|
|
2497
|
+
"jsx-a11y/click-events-have-key-events": "error",
|
|
2498
|
+
"jsx-a11y/control-has-associated-label": [
|
|
2499
|
+
"off",
|
|
2500
|
+
{
|
|
2501
|
+
ignoreElements: [
|
|
2502
|
+
"audio",
|
|
2503
|
+
"canvas",
|
|
2504
|
+
"embed",
|
|
2505
|
+
"input",
|
|
2506
|
+
"textarea",
|
|
2507
|
+
"tr",
|
|
2508
|
+
"video"
|
|
2509
|
+
],
|
|
2510
|
+
ignoreRoles: [
|
|
2511
|
+
"grid",
|
|
2512
|
+
"listbox",
|
|
2513
|
+
"menu",
|
|
2514
|
+
"menubar",
|
|
2515
|
+
"radiogroup",
|
|
2516
|
+
"row",
|
|
2517
|
+
"tablist",
|
|
2518
|
+
"toolbar",
|
|
2519
|
+
"tree",
|
|
2520
|
+
"treegrid"
|
|
2521
|
+
],
|
|
2522
|
+
includeRoles: [
|
|
2523
|
+
"alert",
|
|
2524
|
+
"dialog"
|
|
2525
|
+
]
|
|
2526
|
+
}
|
|
2527
|
+
],
|
|
2528
|
+
"jsx-a11y/heading-has-content": "error",
|
|
2529
|
+
"jsx-a11y/html-has-lang": "error",
|
|
2530
|
+
"jsx-a11y/iframe-has-title": "error",
|
|
2531
|
+
"jsx-a11y/img-redundant-alt": "error",
|
|
2532
|
+
"jsx-a11y/interactive-supports-focus": [
|
|
2533
|
+
"error",
|
|
2534
|
+
{
|
|
2535
|
+
tabbable: [
|
|
2536
|
+
"button",
|
|
2537
|
+
"checkbox",
|
|
2538
|
+
"link",
|
|
2539
|
+
"searchbox",
|
|
2540
|
+
"spinbutton",
|
|
2541
|
+
"switch",
|
|
2542
|
+
"textbox"
|
|
2543
|
+
]
|
|
2544
|
+
}
|
|
2545
|
+
],
|
|
2546
|
+
"jsx-a11y/label-has-associated-control": "error",
|
|
2547
|
+
"jsx-a11y/label-has-for": "off",
|
|
2548
|
+
"jsx-a11y/media-has-caption": "error",
|
|
2549
|
+
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
2550
|
+
"jsx-a11y/no-access-key": "error",
|
|
2551
|
+
"jsx-a11y/no-autofocus": "error",
|
|
2552
|
+
"jsx-a11y/no-distracting-elements": "error",
|
|
2553
|
+
"jsx-a11y/no-interactive-element-to-noninteractive-role": [
|
|
2554
|
+
"error",
|
|
2555
|
+
{
|
|
2556
|
+
canvas: [
|
|
2557
|
+
"img"
|
|
2558
|
+
],
|
|
2559
|
+
tr: [
|
|
2560
|
+
"none",
|
|
2561
|
+
"presentation"
|
|
2562
|
+
]
|
|
2563
|
+
}
|
|
2564
|
+
],
|
|
2565
|
+
"jsx-a11y/no-noninteractive-element-interactions": [
|
|
2566
|
+
"error",
|
|
2567
|
+
{
|
|
2568
|
+
alert: [
|
|
2569
|
+
"onKeyUp",
|
|
2570
|
+
"onKeyDown",
|
|
2571
|
+
"onKeyPress"
|
|
2572
|
+
],
|
|
2573
|
+
body: [
|
|
2574
|
+
"onError",
|
|
2575
|
+
"onLoad"
|
|
2576
|
+
],
|
|
2577
|
+
dialog: [
|
|
2578
|
+
"onKeyUp",
|
|
2579
|
+
"onKeyDown",
|
|
2580
|
+
"onKeyPress"
|
|
2581
|
+
],
|
|
2582
|
+
handlers: [
|
|
2583
|
+
"onClick",
|
|
2584
|
+
"onError",
|
|
2585
|
+
"onLoad",
|
|
2586
|
+
"onMouseDown",
|
|
2587
|
+
"onMouseUp",
|
|
2588
|
+
"onKeyPress",
|
|
2589
|
+
"onKeyDown",
|
|
2590
|
+
"onKeyUp"
|
|
2591
|
+
],
|
|
2592
|
+
iframe: [
|
|
2593
|
+
"onError",
|
|
2594
|
+
"onLoad"
|
|
2595
|
+
],
|
|
2596
|
+
img: [
|
|
2597
|
+
"onError",
|
|
2598
|
+
"onLoad"
|
|
2599
|
+
]
|
|
2600
|
+
}
|
|
2601
|
+
],
|
|
2602
|
+
"jsx-a11y/no-noninteractive-element-to-interactive-role": [
|
|
2603
|
+
"error",
|
|
2604
|
+
{
|
|
2605
|
+
fieldset: [
|
|
2606
|
+
"radiogroup",
|
|
2607
|
+
"presentation"
|
|
2608
|
+
],
|
|
2609
|
+
li: [
|
|
2610
|
+
"menuitem",
|
|
2611
|
+
"option",
|
|
2612
|
+
"row",
|
|
2613
|
+
"tab",
|
|
2614
|
+
"treeitem"
|
|
2615
|
+
],
|
|
2616
|
+
ol: [
|
|
2617
|
+
"listbox",
|
|
2618
|
+
"menu",
|
|
2619
|
+
"menubar",
|
|
2620
|
+
"radiogroup",
|
|
2621
|
+
"tablist",
|
|
2622
|
+
"tree",
|
|
2623
|
+
"treegrid"
|
|
2624
|
+
],
|
|
2625
|
+
table: [
|
|
2626
|
+
"grid"
|
|
2627
|
+
],
|
|
2628
|
+
td: [
|
|
2629
|
+
"gridcell"
|
|
2630
|
+
],
|
|
2631
|
+
ul: [
|
|
2632
|
+
"listbox",
|
|
2633
|
+
"menu",
|
|
2634
|
+
"menubar",
|
|
2635
|
+
"radiogroup",
|
|
2636
|
+
"tablist",
|
|
2637
|
+
"tree",
|
|
2638
|
+
"treegrid"
|
|
2639
|
+
]
|
|
2640
|
+
}
|
|
2641
|
+
],
|
|
2642
|
+
"jsx-a11y/no-noninteractive-tabindex": [
|
|
2643
|
+
"error",
|
|
2644
|
+
{
|
|
2645
|
+
allowExpressionValues: true,
|
|
2646
|
+
roles: [
|
|
2647
|
+
"tabpanel"
|
|
2648
|
+
],
|
|
2649
|
+
tags: []
|
|
2650
|
+
}
|
|
2651
|
+
],
|
|
2652
|
+
"jsx-a11y/no-redundant-roles": "error",
|
|
2653
|
+
"jsx-a11y/no-static-element-interactions": [
|
|
2654
|
+
"error",
|
|
2655
|
+
{
|
|
2656
|
+
allowExpressionValues: true,
|
|
2657
|
+
handlers: [
|
|
2658
|
+
"onClick",
|
|
2659
|
+
"onMouseDown",
|
|
2660
|
+
"onMouseUp",
|
|
2661
|
+
"onKeyPress",
|
|
2662
|
+
"onKeyDown",
|
|
2663
|
+
"onKeyUp"
|
|
2664
|
+
]
|
|
2665
|
+
}
|
|
2666
|
+
],
|
|
2667
|
+
"jsx-a11y/role-has-required-aria-props": "error",
|
|
2668
|
+
"jsx-a11y/role-supports-aria-props": "error",
|
|
2669
|
+
"jsx-a11y/scope": "error",
|
|
2670
|
+
"jsx-a11y/tabindex-no-positive": "error"
|
|
2671
|
+
} : {},
|
|
2672
|
+
// solid recommended rules
|
|
2673
|
+
// reactivity
|
|
2674
|
+
"solid/components-return-once": 1,
|
|
2675
|
+
"solid/event-handlers": 1,
|
|
2676
|
+
// these rules are mostly style suggestions
|
|
2677
|
+
"solid/imports": 1,
|
|
2678
|
+
// identifier usage is important
|
|
2679
|
+
"solid/jsx-no-duplicate-props": 2,
|
|
2680
|
+
"solid/jsx-no-script-url": 2,
|
|
2681
|
+
"solid/jsx-no-undef": 2,
|
|
2682
|
+
"solid/jsx-uses-vars": 2,
|
|
2683
|
+
"solid/no-array-handlers": 0,
|
|
2684
|
+
"solid/no-destructure": 2,
|
|
2685
|
+
// security problems
|
|
2686
|
+
"solid/no-innerhtml": 2,
|
|
2687
|
+
// only necessary for resource-constrained environments
|
|
2688
|
+
"solid/no-proxy-apis": 0,
|
|
2689
|
+
"solid/no-react-deps": 1,
|
|
2690
|
+
"solid/no-react-specific-props": 1,
|
|
2691
|
+
"solid/no-unknown-namespaces": 2,
|
|
2692
|
+
// deprecated
|
|
2693
|
+
"solid/prefer-classlist": 0,
|
|
2694
|
+
"solid/prefer-for": 2,
|
|
2695
|
+
// handled by Solid compiler, opt-in style suggestion
|
|
2696
|
+
"solid/prefer-show": 0,
|
|
2697
|
+
"solid/reactivity": 1,
|
|
2698
|
+
"solid/self-closing-comp": 1,
|
|
2699
|
+
"solid/style-prop": 1,
|
|
2700
|
+
...typescript2 ? {
|
|
2701
|
+
"solid/jsx-no-undef": [2, { typescriptEnabled: true }],
|
|
2702
|
+
// namespaces taken care of by TS
|
|
2703
|
+
"solid/no-unknown-namespaces": 0
|
|
2704
|
+
} : {},
|
|
2705
|
+
// overrides
|
|
2706
|
+
...overrides
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
];
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2451
2712
|
// src/factory.ts
|
|
2452
2713
|
async function luxass(options = {}, ...userConfigs) {
|
|
2453
2714
|
const {
|
|
@@ -2457,6 +2718,7 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
2457
2718
|
gitignore: enableGitignore = true,
|
|
2458
2719
|
nextjs: enableNextJS = false,
|
|
2459
2720
|
react: enableReact = false,
|
|
2721
|
+
solid: enableSolid = false,
|
|
2460
2722
|
tailwindcss: enableTailwindCSS = false,
|
|
2461
2723
|
typescript: enableTypeScript = (0, import_local_pkg3.isPackageExists)("typescript"),
|
|
2462
2724
|
unocss: enableUnoCSS = false,
|
|
@@ -2499,7 +2761,8 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
2499
2761
|
if (enableTypeScript) {
|
|
2500
2762
|
configs.push(typescript({
|
|
2501
2763
|
...resolveSubOptions(options, "typescript"),
|
|
2502
|
-
exts
|
|
2764
|
+
exts,
|
|
2765
|
+
overrides: getOverrides(options, "typescript")
|
|
2503
2766
|
}));
|
|
2504
2767
|
}
|
|
2505
2768
|
if (stylisticOptions) {
|
|
@@ -2523,7 +2786,23 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
2523
2786
|
if (enableNextJS) {
|
|
2524
2787
|
configs.push(
|
|
2525
2788
|
nextjs({
|
|
2526
|
-
...resolveSubOptions(options, "nextjs")
|
|
2789
|
+
...resolveSubOptions(options, "nextjs"),
|
|
2790
|
+
overrides: getOverrides(options, "nextjs")
|
|
2791
|
+
})
|
|
2792
|
+
);
|
|
2793
|
+
}
|
|
2794
|
+
if (enableSolid) {
|
|
2795
|
+
configs.push(
|
|
2796
|
+
// TODO: Analyze if this way is better for performance
|
|
2797
|
+
// await interop(import("./configs/solid")).then((plugin) => plugin.solid({
|
|
2798
|
+
// ...resolveSubOptions(options, "solid"),
|
|
2799
|
+
// overrides: getOverrides(options, "solid"),
|
|
2800
|
+
// typescript: !!enableTypeScript,
|
|
2801
|
+
// })),
|
|
2802
|
+
solid({
|
|
2803
|
+
...resolveSubOptions(options, "solid"),
|
|
2804
|
+
overrides: getOverrides(options, "solid"),
|
|
2805
|
+
typescript: !!enableTypeScript
|
|
2527
2806
|
})
|
|
2528
2807
|
);
|
|
2529
2808
|
}
|
|
@@ -2531,6 +2810,7 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
2531
2810
|
configs.push(
|
|
2532
2811
|
vue({
|
|
2533
2812
|
...resolveSubOptions(options, "vue"),
|
|
2813
|
+
overrides: getOverrides(options, "vue"),
|
|
2534
2814
|
stylistic: stylisticOptions,
|
|
2535
2815
|
typescript: !!enableTypeScript
|
|
2536
2816
|
})
|
|
@@ -2540,6 +2820,7 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
2540
2820
|
configs.push(
|
|
2541
2821
|
astro({
|
|
2542
2822
|
...resolveSubOptions(options, "astro"),
|
|
2823
|
+
overrides: getOverrides(options, "astro"),
|
|
2543
2824
|
typescript: !!enableTypeScript
|
|
2544
2825
|
})
|
|
2545
2826
|
);
|
|
@@ -2580,12 +2861,10 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
2580
2861
|
}
|
|
2581
2862
|
if (options.markdown ?? true) {
|
|
2582
2863
|
configs.push(
|
|
2583
|
-
markdown(
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
}
|
|
2588
|
-
)
|
|
2864
|
+
markdown({
|
|
2865
|
+
exts,
|
|
2866
|
+
overrides: getOverrides(options, "markdown")
|
|
2867
|
+
})
|
|
2589
2868
|
);
|
|
2590
2869
|
}
|
|
2591
2870
|
if (options.formatters) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ConfigOptions, k as FlatConfigItem, l as Awaitable, m as UserConfigItem } from './types-
|
|
2
|
-
export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from './types-
|
|
1
|
+
import { C as ConfigOptions, k as FlatConfigItem, l as Awaitable, m as UserConfigItem } from './types-A-NO9UF1.cjs';
|
|
2
|
+
export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from './types-A-NO9UF1.cjs';
|
|
3
3
|
export { comments } from './configs/comments.cjs';
|
|
4
4
|
export { unicorn } from './configs/unicorn.cjs';
|
|
5
5
|
export { ignores } from './configs/ignores.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ConfigOptions, k as FlatConfigItem, l as Awaitable, m as UserConfigItem } from './types-
|
|
2
|
-
export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from './types-
|
|
1
|
+
import { C as ConfigOptions, k as FlatConfigItem, l as Awaitable, m as UserConfigItem } from './types-A-NO9UF1.js';
|
|
2
|
+
export { A as AstroOptions, F as FormattersOptions, b as JSONOptions, J as JavaScriptOptions, N as NextJSOptions, R as ReactOptions, S as StylisticConfig, c as StylisticOptions, h as TailwindCSSOptions, e as TestOptions, T as TypeScriptOptions, U as UnoCSSOptions, V as VueOptions, Y as YAMLOptions, f as astro, i as formatters, j as javascript, a as jsonc, n as nextjs, r as react, s as stylistic, g as tailwindcss, d as test, t as typescript, u as unocss, v as vue, y as yaml } from './types-A-NO9UF1.js';
|
|
3
3
|
export { comments } from './configs/comments.js';
|
|
4
4
|
export { unicorn } from './configs/unicorn.js';
|
|
5
5
|
export { ignores } from './configs/ignores.js';
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
solid
|
|
3
|
+
} from "./chunk-C5YCKPY4.mjs";
|
|
1
4
|
import {
|
|
2
5
|
toml
|
|
3
6
|
} from "./chunk-UMUUVFB7.mjs";
|
|
4
7
|
import "./chunk-ME2OAMS3.mjs";
|
|
8
|
+
import {
|
|
9
|
+
unocss
|
|
10
|
+
} from "./chunk-KJ7ZCBK4.mjs";
|
|
5
11
|
import {
|
|
6
12
|
vue
|
|
7
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-C67L5T23.mjs";
|
|
8
14
|
import {
|
|
9
15
|
yaml
|
|
10
16
|
} from "./chunk-WOYZWHPM.mjs";
|
|
@@ -25,12 +31,9 @@ import {
|
|
|
25
31
|
import {
|
|
26
32
|
unicorn
|
|
27
33
|
} from "./chunk-RVSUTDCE.mjs";
|
|
28
|
-
import {
|
|
29
|
-
unocss
|
|
30
|
-
} from "./chunk-KJ7ZCBK4.mjs";
|
|
31
34
|
import {
|
|
32
35
|
javascript
|
|
33
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-K6TLNQJF.mjs";
|
|
34
37
|
import {
|
|
35
38
|
jsdoc
|
|
36
39
|
} from "./chunk-DVQQVCGF.mjs";
|
|
@@ -105,6 +108,7 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
105
108
|
gitignore: enableGitignore = true,
|
|
106
109
|
nextjs: enableNextJS = false,
|
|
107
110
|
react: enableReact = false,
|
|
111
|
+
solid: enableSolid = false,
|
|
108
112
|
tailwindcss: enableTailwindCSS = false,
|
|
109
113
|
typescript: enableTypeScript = isPackageExists("typescript"),
|
|
110
114
|
unocss: enableUnoCSS = false,
|
|
@@ -147,7 +151,8 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
147
151
|
if (enableTypeScript) {
|
|
148
152
|
configs.push(typescript({
|
|
149
153
|
...resolveSubOptions(options, "typescript"),
|
|
150
|
-
exts
|
|
154
|
+
exts,
|
|
155
|
+
overrides: getOverrides(options, "typescript")
|
|
151
156
|
}));
|
|
152
157
|
}
|
|
153
158
|
if (stylisticOptions) {
|
|
@@ -171,7 +176,23 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
171
176
|
if (enableNextJS) {
|
|
172
177
|
configs.push(
|
|
173
178
|
nextjs({
|
|
174
|
-
...resolveSubOptions(options, "nextjs")
|
|
179
|
+
...resolveSubOptions(options, "nextjs"),
|
|
180
|
+
overrides: getOverrides(options, "nextjs")
|
|
181
|
+
})
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
if (enableSolid) {
|
|
185
|
+
configs.push(
|
|
186
|
+
// TODO: Analyze if this way is better for performance
|
|
187
|
+
// await interop(import("./configs/solid")).then((plugin) => plugin.solid({
|
|
188
|
+
// ...resolveSubOptions(options, "solid"),
|
|
189
|
+
// overrides: getOverrides(options, "solid"),
|
|
190
|
+
// typescript: !!enableTypeScript,
|
|
191
|
+
// })),
|
|
192
|
+
solid({
|
|
193
|
+
...resolveSubOptions(options, "solid"),
|
|
194
|
+
overrides: getOverrides(options, "solid"),
|
|
195
|
+
typescript: !!enableTypeScript
|
|
175
196
|
})
|
|
176
197
|
);
|
|
177
198
|
}
|
|
@@ -179,6 +200,7 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
179
200
|
configs.push(
|
|
180
201
|
vue({
|
|
181
202
|
...resolveSubOptions(options, "vue"),
|
|
203
|
+
overrides: getOverrides(options, "vue"),
|
|
182
204
|
stylistic: stylisticOptions,
|
|
183
205
|
typescript: !!enableTypeScript
|
|
184
206
|
})
|
|
@@ -188,6 +210,7 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
188
210
|
configs.push(
|
|
189
211
|
astro({
|
|
190
212
|
...resolveSubOptions(options, "astro"),
|
|
213
|
+
overrides: getOverrides(options, "astro"),
|
|
191
214
|
typescript: !!enableTypeScript
|
|
192
215
|
})
|
|
193
216
|
);
|
|
@@ -228,12 +251,10 @@ async function luxass(options = {}, ...userConfigs) {
|
|
|
228
251
|
}
|
|
229
252
|
if (options.markdown ?? true) {
|
|
230
253
|
configs.push(
|
|
231
|
-
markdown(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
)
|
|
254
|
+
markdown({
|
|
255
|
+
exts,
|
|
256
|
+
overrides: getOverrides(options, "markdown")
|
|
257
|
+
})
|
|
237
258
|
);
|
|
238
259
|
}
|
|
239
260
|
if (options.formatters) {
|
|
@@ -53,7 +53,7 @@ interface JSONOptions {
|
|
|
53
53
|
* Glob patterns for JSON files.
|
|
54
54
|
*
|
|
55
55
|
* @default [GLOB_JSON, GLOB_JSON5, GLOB_JSONC]
|
|
56
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
56
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
57
57
|
*/
|
|
58
58
|
files?: string[];
|
|
59
59
|
}
|
|
@@ -80,7 +80,7 @@ interface TypeScriptOptions {
|
|
|
80
80
|
* Glob patterns for TypeScript files.
|
|
81
81
|
*
|
|
82
82
|
* @default GLOB_SRC
|
|
83
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
83
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
84
84
|
*/
|
|
85
85
|
files?: string[];
|
|
86
86
|
/**
|
|
@@ -120,16 +120,16 @@ interface VueOptions {
|
|
|
120
120
|
*/
|
|
121
121
|
sfcBlocks?: boolean | Options;
|
|
122
122
|
/**
|
|
123
|
-
* Enable Vue
|
|
123
|
+
* Enable Vue a11y support.
|
|
124
124
|
*
|
|
125
|
-
* @default
|
|
125
|
+
* @default false
|
|
126
126
|
*/
|
|
127
127
|
a11y?: boolean;
|
|
128
128
|
/**
|
|
129
129
|
* Glob patterns for Vue files.
|
|
130
130
|
*
|
|
131
131
|
* @default GLOB_VUE
|
|
132
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
132
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
133
133
|
*/
|
|
134
134
|
files?: string[];
|
|
135
135
|
}
|
|
@@ -150,7 +150,7 @@ interface YAMLOptions {
|
|
|
150
150
|
* Glob patterns for YAML files.
|
|
151
151
|
*
|
|
152
152
|
* @default GLOB_YAML
|
|
153
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
153
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
154
154
|
*/
|
|
155
155
|
files?: string[];
|
|
156
156
|
}
|
|
@@ -167,7 +167,7 @@ interface TestOptions {
|
|
|
167
167
|
* Glob patterns for test files.
|
|
168
168
|
*
|
|
169
169
|
* @default GLOB_TESTS
|
|
170
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
170
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
171
171
|
*/
|
|
172
172
|
files?: string[];
|
|
173
173
|
/**
|
|
@@ -194,7 +194,7 @@ interface UnoCSSOptions {
|
|
|
194
194
|
* Glob patterns for files that includes unocss classes.
|
|
195
195
|
*
|
|
196
196
|
* @default GLOB_SRC
|
|
197
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
197
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
198
198
|
*/
|
|
199
199
|
files?: string[];
|
|
200
200
|
/**
|
|
@@ -220,7 +220,7 @@ interface NextJSOptions {
|
|
|
220
220
|
* Glob patterns for Next.js files.
|
|
221
221
|
*
|
|
222
222
|
* @default [GLOB_SRC]
|
|
223
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
223
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
224
224
|
*/
|
|
225
225
|
files?: string[];
|
|
226
226
|
}
|
|
@@ -234,20 +234,20 @@ interface ReactOptions {
|
|
|
234
234
|
/**
|
|
235
235
|
* Enable TypeScript support.
|
|
236
236
|
*
|
|
237
|
-
* @default
|
|
237
|
+
* @default true
|
|
238
238
|
*/
|
|
239
239
|
typescript?: boolean;
|
|
240
240
|
/**
|
|
241
|
-
* Enable
|
|
241
|
+
* Enable JSX A11y support.
|
|
242
242
|
*
|
|
243
|
-
* @default
|
|
243
|
+
* @default false
|
|
244
244
|
*/
|
|
245
245
|
a11y?: boolean;
|
|
246
246
|
/**
|
|
247
247
|
* Glob patterns for JSX & TSX files.
|
|
248
248
|
*
|
|
249
249
|
* @default [GLOB_JSX, GLOB_TSX]
|
|
250
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
250
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
251
251
|
*/
|
|
252
252
|
files?: string[];
|
|
253
253
|
}
|
|
@@ -285,7 +285,7 @@ interface TailwindCSSOptions {
|
|
|
285
285
|
* Glob patterns for files that includes tailwind classes.
|
|
286
286
|
*
|
|
287
287
|
* @default [GLOB_SRC]
|
|
288
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
288
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
289
289
|
*/
|
|
290
290
|
files?: string[];
|
|
291
291
|
/**
|
|
@@ -454,12 +454,39 @@ interface TOMLOptions {
|
|
|
454
454
|
* Glob patterns for TOML files.
|
|
455
455
|
*
|
|
456
456
|
* @default [GLOB_TOML]
|
|
457
|
-
* @see https://github.com/luxass/eslint-config/blob/
|
|
457
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
458
458
|
*/
|
|
459
459
|
files?: string[];
|
|
460
460
|
}
|
|
461
461
|
declare function toml(options?: TOMLOptions): Promise<FlatConfigItem[]>;
|
|
462
462
|
|
|
463
|
+
interface SolidOptions {
|
|
464
|
+
/**
|
|
465
|
+
* Override rules.
|
|
466
|
+
*/
|
|
467
|
+
overrides?: FlatConfigItem["rules"];
|
|
468
|
+
/**
|
|
469
|
+
* Enable TypeScript support.
|
|
470
|
+
*
|
|
471
|
+
* @default true
|
|
472
|
+
*/
|
|
473
|
+
typescript?: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Enable JSX A11y support.
|
|
476
|
+
*
|
|
477
|
+
* @default false
|
|
478
|
+
*/
|
|
479
|
+
a11y?: boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Glob patterns for JSX & TSX files.
|
|
482
|
+
*
|
|
483
|
+
* @default [GLOB_JSX, GLOB_TSX]
|
|
484
|
+
* @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
|
|
485
|
+
*/
|
|
486
|
+
files?: string[];
|
|
487
|
+
}
|
|
488
|
+
declare function solid(options?: SolidOptions): Promise<FlatConfigItem[]>;
|
|
489
|
+
|
|
463
490
|
type WrapRuleConfig<T extends {
|
|
464
491
|
[key: string]: any;
|
|
465
492
|
}> = {
|
|
@@ -627,6 +654,15 @@ interface ConfigOptions {
|
|
|
627
654
|
* @default []
|
|
628
655
|
*/
|
|
629
656
|
exts?: string[];
|
|
657
|
+
/**
|
|
658
|
+
* Enable Solid support.
|
|
659
|
+
*
|
|
660
|
+
* Requires installing:
|
|
661
|
+
* - `eslint-plugin-solid`
|
|
662
|
+
*
|
|
663
|
+
* @default false
|
|
664
|
+
*/
|
|
665
|
+
solid?: boolean | SolidOptions;
|
|
630
666
|
}
|
|
631
667
|
|
|
632
|
-
export { type AstroOptions as A, type ConfigOptions as C, type FormattersOptions as F, type JavaScriptOptions as J, type NextJSOptions as N, type ReactOptions as R, type StylisticConfig as S, type TypeScriptOptions as T, type UnoCSSOptions as U, type VueOptions as V, type YAMLOptions as Y, jsonc as a, type JSONOptions as b, type StylisticOptions as c, test as d, type TestOptions as e, astro as f, tailwindcss as g, type TailwindCSSOptions as h, formatters as i, javascript as j, type FlatConfigItem as k, type Awaitable as l, type UserConfigItem as m, nextjs as n, StylisticConfigDefaults as o, type TOMLOptions as p, toml as q, react as r, stylistic as s, typescript as t, unocss as u, vue as v, yaml as y };
|
|
668
|
+
export { type AstroOptions as A, type ConfigOptions as C, type FormattersOptions as F, type JavaScriptOptions as J, type NextJSOptions as N, type ReactOptions as R, type StylisticConfig as S, type TypeScriptOptions as T, type UnoCSSOptions as U, type VueOptions as V, type YAMLOptions as Y, jsonc as a, type JSONOptions as b, type StylisticOptions as c, test as d, type TestOptions as e, astro as f, tailwindcss as g, type TailwindCSSOptions as h, formatters as i, javascript as j, type FlatConfigItem as k, type Awaitable as l, type UserConfigItem as m, nextjs as n, StylisticConfigDefaults as o, type TOMLOptions as p, toml as q, react as r, stylistic as s, typescript as t, unocss as u, vue as v, type SolidOptions as w, solid as x, yaml as y };
|