@nekoyasuii/config 0.1.4 → 0.1.7

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.
Files changed (31) hide show
  1. package/dist/{chunk-fqcw0kzp.js → chunk-5vqtdgjy.js} +134 -10
  2. package/dist/{chunk-0xdbbpn5.js → chunk-cpyyjvfv.js} +2 -2
  3. package/dist/{chunk-08m6971b.js → chunk-k5zpegn9.js} +5 -5
  4. package/dist/{chunk-41590bpf.js → chunk-tvk9tq03.js} +2 -2
  5. package/dist/tools/oxfmt/index.js +3 -4
  6. package/dist/tools/oxlint/config/core/index.js +4 -5
  7. package/dist/tools/oxlint/config/index.d.ts +47 -45
  8. package/dist/tools/oxlint/config/index.js +11 -20
  9. package/dist/tools/oxlint/config/js-plugins/index.d.ts +270 -64
  10. package/dist/tools/oxlint/config/js-plugins/index.js +6 -7
  11. package/dist/tools/oxlint/config/react/index.js +3 -4
  12. package/dist/tools/oxlint/config/remix/index.js +0 -2
  13. package/dist/tools/oxlint/config/tanstack/index.js +0 -2
  14. package/dist/tools/oxlint/config/tanstack/js-plugins/index.d.ts +4 -4
  15. package/dist/tools/oxlint/config/tanstack/js-plugins/index.js +0 -2
  16. package/dist/tools/oxlint/config/{anti-slop/plugin.js → vendors/anti-slop.js} +717 -35
  17. package/dist/tools/oxlint/config/{no-comment-slop/plugin.d.ts → vendors/no-comment-slop.d.ts} +34 -0
  18. package/dist/tools/oxlint/config/{no-comment-slop/plugin.js → vendors/no-comment-slop.js} +72 -8
  19. package/dist/tools/oxlint/config/vendors/shadcn.d.ts +41 -0
  20. package/dist/tools/oxlint/config/vendors/shadcn.js +7159 -0
  21. package/dist/tools/oxlint/rules/index.js +7 -9
  22. package/dist/tools/shared/ignores.js +3 -4
  23. package/package.json +3 -8
  24. package/dist/chunk-5wgwscd0.js +0 -4
  25. package/dist/chunk-97s6xvc6.js +0 -32
  26. package/dist/chunk-c8jq73qx.js +0 -38
  27. package/dist/tools/oxlint/config/anti-slop/index.d.ts +0 -42
  28. package/dist/tools/oxlint/config/anti-slop/index.js +0 -7
  29. package/dist/tools/oxlint/config/no-comment-slop/index.d.ts +0 -19
  30. package/dist/tools/oxlint/config/no-comment-slop/index.js +0 -7
  31. /package/dist/tools/oxlint/config/{anti-slop/plugin.d.ts → vendors/anti-slop.d.ts} +0 -0
@@ -1,33 +1,48 @@
1
- import {
2
- __require
3
- } from "./chunk-5wgwscd0.js";
4
-
5
1
  // tools/oxlint/config/js-plugins/index.ts
6
2
  import { existsSync } from "node:fs";
7
3
  import { fileURLToPath } from "node:url";
8
4
  import { defineConfig } from "oxlint";
9
5
  var lazueePluginCandidates = [
10
- new URL("../../rules/index.js", import.meta.url),
6
+ new URL("../rules/index.js", import.meta.url),
11
7
  new URL("tools/oxlint/rules/index.js", import.meta.url)
12
8
  ];
13
9
  var lazueePluginSpecifier = fileURLToPath(lazueePluginCandidates.find((candidate) => existsSync(candidate)) ?? lazueePluginCandidates[0]);
10
+ var antiSlopPluginCandidates = [
11
+ new URL("../config/vendors/anti-slop.js", import.meta.url),
12
+ new URL("tools/oxlint/config/vendors/anti-slop.js", import.meta.url)
13
+ ];
14
+ var antiSlopPluginSpecifier = fileURLToPath(antiSlopPluginCandidates.find((candidate) => existsSync(candidate)) ?? antiSlopPluginCandidates[0]);
15
+ var noCommentSlopPluginCandidates = [
16
+ new URL("../config/vendors/no-comment-slop.js", import.meta.url),
17
+ new URL("tools/oxlint/config/vendors/no-comment-slop.js", import.meta.url)
18
+ ];
19
+ var noCommentSlopPluginSpecifier = fileURLToPath(noCommentSlopPluginCandidates.find((candidate) => existsSync(candidate)) ?? noCommentSlopPluginCandidates[0]);
20
+ var shadcnLintPluginCandidates = [
21
+ new URL("../config/vendors/shadcn.js", import.meta.url),
22
+ new URL("tools/oxlint/config/vendors/shadcn.js", import.meta.url)
23
+ ];
24
+ var shadcnLintPluginSpecifier = fileURLToPath(shadcnLintPluginCandidates.find((candidate) => existsSync(candidate)) ?? shadcnLintPluginCandidates[0]);
14
25
  var reactDoctorRules = await import("oxlint-plugin-react-doctor").then(({ ALL_REACT_DOCTOR_RULES }) => ALL_REACT_DOCTOR_RULES).catch(() => null);
15
26
  var jsPluginEntries = [
16
27
  { name: "github", specifier: "eslint-plugin-github" },
17
28
  { name: "sonarjs", specifier: "eslint-plugin-sonarjs" },
18
29
  { name: "react-doctor", specifier: "oxlint-plugin-react-doctor" },
19
30
  { name: "tailwindcss", specifier: "oxlint-tailwindcss" },
31
+ { name: "anti-slop", specifier: antiSlopPluginSpecifier },
32
+ { name: "no-comment-slop", specifier: noCommentSlopPluginSpecifier },
33
+ { name: "shadcn", specifier: shadcnLintPluginSpecifier },
20
34
  { name: "lazuee", specifier: lazueePluginSpecifier }
21
35
  ];
22
- var jsPluginSettings = {
36
+ var jsPluginSettings2 = {
23
37
  "react-doctor": {
24
38
  portedRuleMode: "curated"
25
39
  }
26
40
  };
27
41
  var jsPlugins = [...jsPluginEntries];
42
+ var PAGE_ROUTE_FILENAME_PATTERN = "^(?:\\[\\[\\.\\.\\.[a-z0-9-]+\\]\\]|\\[(?:\\.\\.\\.)?[a-z0-9-]+\\]|[a-z0-9-]+)+(?:\\.[a-z0-9-]+)?$";
28
43
  var config = defineConfig({
29
44
  jsPlugins,
30
- settings: jsPluginSettings,
45
+ settings: jsPluginSettings2,
31
46
  overrides: [
32
47
  {
33
48
  files: [
@@ -50,6 +65,37 @@ var config = defineConfig({
50
65
  rules: {
51
66
  "lazuee/canonical-header-names": "off"
52
67
  }
68
+ },
69
+ {
70
+ files: ["**/routes/**/*.{tsx,ts}", "**/app/routes/**/*.{tsx,ts}"],
71
+ rules: {
72
+ "github/filenames-match-regex": "off"
73
+ }
74
+ },
75
+ {
76
+ files: ["**/pages/**/*.{astro,js,jsx,mjs,mts,ts,tsx}"],
77
+ rules: {
78
+ "github/filenames-match-regex": ["error", PAGE_ROUTE_FILENAME_PATTERN]
79
+ }
80
+ },
81
+ {
82
+ files: ["**/components/**/*.{tsx,jsx}"],
83
+ rules: {
84
+ "shadcn/no-restyle": "off",
85
+ "shadcn/no-arbitrary-values": "off",
86
+ "shadcn/require-static-classes": "off"
87
+ }
88
+ },
89
+ {
90
+ files: ["**/logo.tsx"],
91
+ rules: { "shadcn/no-raw-colors": "off" }
92
+ },
93
+ {
94
+ files: ["scripts/**"],
95
+ rules: {
96
+ "anti-slop/no-unknown-parameters": "off",
97
+ "anti-slop/no-unsafe-dictionary-type": "off"
98
+ }
53
99
  }
54
100
  ],
55
101
  rules: {
@@ -428,11 +474,89 @@ var config = defineConfig({
428
474
  "lazuee/prefer-alias": "error",
429
475
  "lazuee/no-ts-accessibility": "off",
430
476
  "lazuee/interface-pascal-case": "off",
431
- "lazuee/canonical-header-names": "off"
477
+ "lazuee/canonical-header-names": "off",
478
+ "anti-slop/no-chained-type-assertions": "error",
479
+ "anti-slop/no-conditional-empty-object-spread": "error",
480
+ "anti-slop/no-known-value-widening": "error",
481
+ "anti-slop/no-module-mocking": "error",
482
+ "anti-slop/no-object-parameters": "error",
483
+ "anti-slop/no-reflect-apply": "error",
484
+ "anti-slop/no-reflect-get": "error",
485
+ "anti-slop/no-runtime-typeof": ["error", { allowInTypeGuards: true }],
486
+ "anti-slop/no-shape-in-symbol-names": "error",
487
+ "anti-slop/no-unknown-parameters": "error",
488
+ "anti-slop/no-unknown-returns": "error",
489
+ "anti-slop/no-unknown-type-aliases": "error",
490
+ "anti-slop/no-unsafe-dictionary-type": "error",
491
+ "anti-slop/no-widen-then-assert": "error",
492
+ "anti-slop/require-safety-comment-for-type-assertion": "error",
493
+ "typescript/consistent-indexed-object-style": "off",
494
+ "unicorn/no-immediate-mutation": "off",
495
+ "no-comment-slop/max-comment-lines": "error",
496
+ "no-comment-slop/no-banner-comment": "error",
497
+ "no-comment-slop/no-trailing-comment": "error",
498
+ "no-comment-slop/prefer-jsdoc-for-exports": "error",
499
+ "no-comment-slop/prefer-jsdoc-for-members": "error",
500
+ "no-comment-slop/require-member-docs": "error",
501
+ "no-comment-slop/multiline-jsdoc-format": "error",
502
+ "no-comment-slop/no-trailing-period": "error",
503
+ "no-comment-slop/no-em-dash": "error",
504
+ "no-comment-slop/no-jargon": "error",
505
+ "no-comment-slop/no-foreign-syntax": "error",
506
+ "shadcn/no-restyle": [
507
+ "error",
508
+ {
509
+ allow: ["layout"],
510
+ contracts: [
511
+ {
512
+ pattern: "(Content|Header|Footer|Group|Panel)$",
513
+ allow: ["layout", "spacing"]
514
+ },
515
+ {
516
+ pattern: "^Card(Action|Content|Description|Footer|Header|Title)?$",
517
+ allow: ["layout", "spacing"]
518
+ },
519
+ { pattern: "^Skeleton$", allow: ["layout", "shape"] },
520
+ {
521
+ pattern: "^InputGroup$",
522
+ allow: ["layout", "bg-background", "shadow-none"]
523
+ },
524
+ { pattern: "^TableRow$", allow: ["layout", "hover:bg-transparent"] },
525
+ { pattern: "^Tabs$", allow: ["layout", "spacing"] },
526
+ { pattern: "^Sidebar$", allow: ["layout", "border-*"] },
527
+ {
528
+ pattern: "^Sidebar(GroupContent|Header|Menu|MenuItem)$",
529
+ allow: ["layout", "spacing"]
530
+ },
531
+ { pattern: "^BreadcrumbPage$", allow: ["layout", "truncate"] }
532
+ ]
533
+ }
534
+ ],
535
+ "shadcn/no-raw-colors": "error",
536
+ "shadcn/no-arbitrary-values": ["error", { allow: ["layout"] }],
537
+ "shadcn/no-inline-styles": [
538
+ "error",
539
+ {
540
+ allow: [
541
+ "left",
542
+ "top",
543
+ "width",
544
+ "height",
545
+ "background",
546
+ "backgroundColor",
547
+ "borderColor",
548
+ "color",
549
+ "gridTemplateColumns",
550
+ "paddingLeft"
551
+ ]
552
+ }
553
+ ],
554
+ "shadcn/no-unknown-classes": "error",
555
+ "shadcn/require-static-classes": "error"
432
556
  }
433
557
  });
434
558
  var js_plugins_default = config;
435
- var selectJsPlugins = (pluginNames) => {
559
+ var selectJsPlugins2 = (pluginNames) => {
436
560
  const names = new Set(pluginNames);
437
561
  const isSelectedRule = ([ruleName]) => {
438
562
  const [pluginName = ""] = ruleName.split("/");
@@ -449,4 +573,4 @@ var selectJsPlugins = (pluginNames) => {
449
573
  });
450
574
  };
451
575
 
452
- export { jsPluginSettings, selectJsPlugins, js_plugins_default };
576
+ export { jsPluginSettings2, selectJsPlugins2, js_plugins_default };
@@ -1,6 +1,6 @@
1
1
  // tools/oxlint/config/react/index.ts
2
2
  import { defineConfig } from "oxlint";
3
- var reactConfig = defineConfig({
3
+ var reactConfig2 = defineConfig({
4
4
  plugins: ["react", "react-perf", "jsx-a11y"],
5
5
  rules: {
6
6
  "jsx-a11y/alt-text": "error",
@@ -159,4 +159,4 @@ var reactConfig = defineConfig({
159
159
  }
160
160
  });
161
161
 
162
- export { reactConfig };
162
+ export { reactConfig2 };
@@ -1,14 +1,14 @@
1
1
  import {
2
- ignorePatterns
3
- } from "./chunk-41590bpf.js";
2
+ ignorePatterns2
3
+ } from "./chunk-tvk9tq03.js";
4
4
 
5
5
  // tools/oxlint/config/core/index.ts
6
6
  import { defineConfig } from "oxlint";
7
- var coreConfig = defineConfig({
7
+ var coreConfig2 = defineConfig({
8
8
  env: {
9
9
  browser: true
10
10
  },
11
- ignorePatterns,
11
+ ignorePatterns: ignorePatterns2,
12
12
  overrides: [
13
13
  {
14
14
  files: [
@@ -562,4 +562,4 @@ var coreConfig = defineConfig({
562
562
  }
563
563
  });
564
564
 
565
- export { coreConfig };
565
+ export { coreConfig2 };
@@ -1,5 +1,5 @@
1
1
  // tools/shared/ignores.ts
2
- var ignorePatterns = [
2
+ var ignorePatterns2 = [
3
3
  "**/node_modules",
4
4
  "**/.git",
5
5
  "**/dist",
@@ -67,4 +67,4 @@ var ignorePatterns = [
67
67
  "**/pnpm-workspace.yaml"
68
68
  ];
69
69
 
70
- export { ignorePatterns };
70
+ export { ignorePatterns2 };
@@ -1,7 +1,6 @@
1
1
  import {
2
- ignorePatterns
3
- } from "../../chunk-41590bpf.js";
4
- import"../../chunk-5wgwscd0.js";
2
+ ignorePatterns2
3
+ } from "../../chunk-tvk9tq03.js";
5
4
 
6
5
  // tools/oxfmt/index.ts
7
6
  import { defineConfig } from "oxfmt";
@@ -10,7 +9,7 @@ var oxfmt_default = defineConfig({
10
9
  bracketSameLine: false,
11
10
  bracketSpacing: true,
12
11
  endOfLine: "lf",
13
- ignorePatterns,
12
+ ignorePatterns: ignorePatterns2,
14
13
  jsxSingleQuote: false,
15
14
  printWidth: 80,
16
15
  proseWrap: "never",
@@ -1,8 +1,7 @@
1
1
  import {
2
- coreConfig
3
- } from "../../../../chunk-08m6971b.js";
4
- import"../../../../chunk-41590bpf.js";
5
- import"../../../../chunk-5wgwscd0.js";
2
+ coreConfig2
3
+ } from "../../../../chunk-k5zpegn9.js";
4
+ import"../../../../chunk-tvk9tq03.js";
6
5
  export {
7
- coreConfig
6
+ coreConfig2 as coreConfig
8
7
  };
@@ -1,31 +1,5 @@
1
1
  declare const _default: {
2
2
  extends: ({
3
- jsPlugins: {
4
- name: string;
5
- specifier: string;
6
- }[];
7
- rules: {
8
- "anti-slop/no-chained-type-assertions": "error";
9
- "anti-slop/no-conditional-empty-object-spread": "error";
10
- "anti-slop/no-known-value-widening": "error";
11
- "anti-slop/no-module-mocking": "error";
12
- "anti-slop/no-object-parameters": "error";
13
- "anti-slop/no-reflect-apply": "error";
14
- "anti-slop/no-reflect-get": "error";
15
- "anti-slop/no-runtime-typeof": ["error", {
16
- allowInTypeGuards: boolean;
17
- }];
18
- "anti-slop/no-shape-in-symbol-names": "error";
19
- "anti-slop/no-unknown-parameters": "error";
20
- "anti-slop/no-unknown-returns": "error";
21
- "anti-slop/no-unknown-type-aliases": "error";
22
- "anti-slop/no-unsafe-dictionary-type": "error";
23
- "anti-slop/no-widen-then-assert": "error";
24
- "anti-slop/require-safety-comment-for-type-assertion": "error";
25
- "typescript/consistent-indexed-object-style": "off";
26
- "unicorn/no-immediate-mutation": "off";
27
- };
28
- } | {
29
3
  env: {
30
4
  browser: true;
31
5
  };
@@ -600,6 +574,15 @@ declare const _default: {
600
574
  } | {
601
575
  readonly name: "tailwindcss";
602
576
  readonly specifier: "oxlint-tailwindcss";
577
+ } | {
578
+ readonly name: "anti-slop";
579
+ readonly specifier: string;
580
+ } | {
581
+ readonly name: "no-comment-slop";
582
+ readonly specifier: string;
583
+ } | {
584
+ readonly name: "shadcn";
585
+ readonly specifier: string;
603
586
  } | {
604
587
  readonly name: "lazuee";
605
588
  readonly specifier: string;
@@ -619,27 +602,46 @@ declare const _default: {
619
602
  rules: {
620
603
  [k: string]: any;
621
604
  };
605
+ } | {
606
+ files: string[];
607
+ rules: {
608
+ [k: string]: any;
609
+ };
610
+ } | {
611
+ files: string[];
612
+ rules: {
613
+ [k: string]: any;
614
+ };
615
+ } | {
616
+ files: string[];
617
+ rules: {
618
+ [k: string]: any;
619
+ };
620
+ } | {
621
+ files: string[];
622
+ rules: {
623
+ [k: string]: any;
624
+ };
625
+ } | {
626
+ files: string[];
627
+ rules: {
628
+ [k: string]: any;
629
+ };
622
630
  })[];
623
631
  rules: {
624
- [k: string]: "error" | "off" | "warn" | ["error", number];
625
- };
626
- } | {
627
- jsPlugins: {
628
- name: string;
629
- specifier: string;
630
- }[];
631
- rules: {
632
- "no-comment-slop/max-comment-lines": "error";
633
- "no-comment-slop/no-banner-comment": "error";
634
- "no-comment-slop/no-trailing-comment": "error";
635
- "no-comment-slop/prefer-jsdoc-for-exports": "error";
636
- "no-comment-slop/prefer-jsdoc-for-members": "error";
637
- "no-comment-slop/require-member-docs": "error";
638
- "no-comment-slop/multiline-jsdoc-format": "error";
639
- "no-comment-slop/no-trailing-period": "error";
640
- "no-comment-slop/no-em-dash": "error";
641
- "no-comment-slop/no-jargon": "error";
642
- "no-comment-slop/no-foreign-syntax": "error";
632
+ [k: string]: "error" | "off" | "warn" | ["error", number] | ["error", {
633
+ allowInTypeGuards: boolean;
634
+ }] | ["error", {
635
+ allow: string[];
636
+ contracts: {
637
+ pattern: string;
638
+ allow: string[];
639
+ }[];
640
+ }] | ["error", {
641
+ allow: string[];
642
+ }] | ["error", {
643
+ allow: string[];
644
+ }];
643
645
  };
644
646
  } | {
645
647
  plugins: ("jsx-a11y" | "react" | "react-perf")[];
@@ -1,32 +1,23 @@
1
+ import"../../../chunk-tvk9tq03.js";
1
2
  import {
2
- coreConfig
3
- } from "../../../chunk-08m6971b.js";
3
+ coreConfig2
4
+ } from "../../../chunk-k5zpegn9.js";
4
5
  import {
5
- selectJsPlugins
6
- } from "../../../chunk-fqcw0kzp.js";
7
- import"../../../chunk-41590bpf.js";
6
+ selectJsPlugins2
7
+ } from "../../../chunk-5vqtdgjy.js";
8
8
  import {
9
- reactConfig
10
- } from "../../../chunk-0xdbbpn5.js";
11
- import {
12
- noCommentSlopConfig
13
- } from "../../../chunk-97s6xvc6.js";
14
- import {
15
- antiSlopConfig
16
- } from "../../../chunk-c8jq73qx.js";
17
- import"../../../chunk-5wgwscd0.js";
9
+ reactConfig2
10
+ } from "../../../chunk-cpyyjvfv.js";
18
11
 
19
12
  // tools/oxlint/config/index.ts
20
13
  import { defineConfig } from "oxlint";
21
14
  var config_default = defineConfig({
22
15
  extends: [
23
- coreConfig,
24
- reactConfig,
25
- selectJsPlugins(["lazuee", "react-doctor"]),
26
- antiSlopConfig,
27
- noCommentSlopConfig
16
+ coreConfig2,
17
+ reactConfig2,
18
+ selectJsPlugins2(["lazuee", "react-doctor", "anti-slop", "no-comment-slop", "shadcn"])
28
19
  ],
29
- ignorePatterns: [...coreConfig.ignorePatterns ?? []],
20
+ ignorePatterns: [...coreConfig2.ignorePatterns ?? []],
30
21
  overrides: [
31
22
  {
32
23
  files: ["**/server/**"],