@nekoyasuii/config 0.1.5 → 0.1.8

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-5cy3qjw4.js} +130 -16
  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 -13
  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,38 @@
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
- import { fileURLToPath } from "node:url";
3
+ import path from "node:path";
8
4
  import { defineConfig } from "oxlint";
9
- var lazueePluginCandidates = [
10
- new URL("../../rules/index.js", import.meta.url),
11
- new URL("tools/oxlint/rules/index.js", import.meta.url)
12
- ];
13
- var lazueePluginSpecifier = fileURLToPath(lazueePluginCandidates.find((candidate) => existsSync(candidate)) ?? lazueePluginCandidates[0]);
5
+ var packageRoot = (() => {
6
+ let dir = import.meta.dirname;
7
+ while (!existsSync(path.join(dir, "tools", "oxlint")) && dir !== path.dirname(dir))
8
+ dir = path.dirname(dir);
9
+ return dir;
10
+ })();
11
+ var localPlugin = (relative) => path.join(packageRoot, relative);
14
12
  var reactDoctorRules = await import("oxlint-plugin-react-doctor").then(({ ALL_REACT_DOCTOR_RULES }) => ALL_REACT_DOCTOR_RULES).catch(() => null);
15
13
  var jsPluginEntries = [
16
14
  { name: "github", specifier: "eslint-plugin-github" },
17
15
  { name: "sonarjs", specifier: "eslint-plugin-sonarjs" },
18
16
  { name: "react-doctor", specifier: "oxlint-plugin-react-doctor" },
19
17
  { name: "tailwindcss", specifier: "oxlint-tailwindcss" },
20
- { name: "lazuee", specifier: lazueePluginSpecifier }
18
+ { name: "anti-slop", specifier: localPlugin("tools/oxlint/config/vendors/anti-slop.js") },
19
+ {
20
+ name: "no-comment-slop",
21
+ specifier: localPlugin("tools/oxlint/config/vendors/no-comment-slop.js")
22
+ },
23
+ { name: "shadcn", specifier: localPlugin("tools/oxlint/config/vendors/shadcn.js") },
24
+ { name: "lazuee", specifier: localPlugin("tools/oxlint/rules/index.js") }
21
25
  ];
22
- var jsPluginSettings = {
26
+ var jsPluginSettings2 = {
23
27
  "react-doctor": {
24
28
  portedRuleMode: "curated"
25
29
  }
26
30
  };
27
31
  var jsPlugins = [...jsPluginEntries];
32
+ var PAGE_ROUTE_FILENAME_PATTERN = "^(?:\\[\\[\\.\\.\\.[a-z0-9-]+\\]\\]|\\[(?:\\.\\.\\.)?[a-z0-9-]+\\]|[a-z0-9-]+)+(?:\\.[a-z0-9-]+)?$";
28
33
  var config = defineConfig({
29
34
  jsPlugins,
30
- settings: jsPluginSettings,
35
+ settings: jsPluginSettings2,
31
36
  overrides: [
32
37
  {
33
38
  files: [
@@ -50,6 +55,37 @@ var config = defineConfig({
50
55
  rules: {
51
56
  "lazuee/canonical-header-names": "off"
52
57
  }
58
+ },
59
+ {
60
+ files: ["**/routes/**/*.{tsx,ts}", "**/app/routes/**/*.{tsx,ts}"],
61
+ rules: {
62
+ "github/filenames-match-regex": "off"
63
+ }
64
+ },
65
+ {
66
+ files: ["**/pages/**/*.{astro,js,jsx,mjs,mts,ts,tsx}"],
67
+ rules: {
68
+ "github/filenames-match-regex": ["error", PAGE_ROUTE_FILENAME_PATTERN]
69
+ }
70
+ },
71
+ {
72
+ files: ["**/components/**/*.{tsx,jsx}"],
73
+ rules: {
74
+ "shadcn/no-restyle": "off",
75
+ "shadcn/no-arbitrary-values": "off",
76
+ "shadcn/require-static-classes": "off"
77
+ }
78
+ },
79
+ {
80
+ files: ["**/logo.tsx"],
81
+ rules: { "shadcn/no-raw-colors": "off" }
82
+ },
83
+ {
84
+ files: ["scripts/**"],
85
+ rules: {
86
+ "anti-slop/no-unknown-parameters": "off",
87
+ "anti-slop/no-unsafe-dictionary-type": "off"
88
+ }
53
89
  }
54
90
  ],
55
91
  rules: {
@@ -428,11 +464,89 @@ var config = defineConfig({
428
464
  "lazuee/prefer-alias": "error",
429
465
  "lazuee/no-ts-accessibility": "off",
430
466
  "lazuee/interface-pascal-case": "off",
431
- "lazuee/canonical-header-names": "off"
467
+ "lazuee/canonical-header-names": "off",
468
+ "anti-slop/no-chained-type-assertions": "error",
469
+ "anti-slop/no-conditional-empty-object-spread": "error",
470
+ "anti-slop/no-known-value-widening": "error",
471
+ "anti-slop/no-module-mocking": "error",
472
+ "anti-slop/no-object-parameters": "error",
473
+ "anti-slop/no-reflect-apply": "error",
474
+ "anti-slop/no-reflect-get": "error",
475
+ "anti-slop/no-runtime-typeof": ["error", { allowInTypeGuards: true }],
476
+ "anti-slop/no-shape-in-symbol-names": "error",
477
+ "anti-slop/no-unknown-parameters": "error",
478
+ "anti-slop/no-unknown-returns": "error",
479
+ "anti-slop/no-unknown-type-aliases": "error",
480
+ "anti-slop/no-unsafe-dictionary-type": "error",
481
+ "anti-slop/no-widen-then-assert": "error",
482
+ "anti-slop/require-safety-comment-for-type-assertion": "error",
483
+ "typescript/consistent-indexed-object-style": "off",
484
+ "unicorn/no-immediate-mutation": "off",
485
+ "no-comment-slop/max-comment-lines": "error",
486
+ "no-comment-slop/no-banner-comment": "error",
487
+ "no-comment-slop/no-trailing-comment": "error",
488
+ "no-comment-slop/prefer-jsdoc-for-exports": "error",
489
+ "no-comment-slop/prefer-jsdoc-for-members": "error",
490
+ "no-comment-slop/require-member-docs": "error",
491
+ "no-comment-slop/multiline-jsdoc-format": "error",
492
+ "no-comment-slop/no-trailing-period": "error",
493
+ "no-comment-slop/no-em-dash": "error",
494
+ "no-comment-slop/no-jargon": "error",
495
+ "no-comment-slop/no-foreign-syntax": "error",
496
+ "shadcn/no-restyle": [
497
+ "error",
498
+ {
499
+ allow: ["layout"],
500
+ contracts: [
501
+ {
502
+ pattern: "(Content|Header|Footer|Group|Panel)$",
503
+ allow: ["layout", "spacing"]
504
+ },
505
+ {
506
+ pattern: "^Card(Action|Content|Description|Footer|Header|Title)?$",
507
+ allow: ["layout", "spacing"]
508
+ },
509
+ { pattern: "^Skeleton$", allow: ["layout", "shape"] },
510
+ {
511
+ pattern: "^InputGroup$",
512
+ allow: ["layout", "bg-background", "shadow-none"]
513
+ },
514
+ { pattern: "^TableRow$", allow: ["layout", "hover:bg-transparent"] },
515
+ { pattern: "^Tabs$", allow: ["layout", "spacing"] },
516
+ { pattern: "^Sidebar$", allow: ["layout", "border-*"] },
517
+ {
518
+ pattern: "^Sidebar(GroupContent|Header|Menu|MenuItem)$",
519
+ allow: ["layout", "spacing"]
520
+ },
521
+ { pattern: "^BreadcrumbPage$", allow: ["layout", "truncate"] }
522
+ ]
523
+ }
524
+ ],
525
+ "shadcn/no-raw-colors": "error",
526
+ "shadcn/no-arbitrary-values": ["error", { allow: ["layout"] }],
527
+ "shadcn/no-inline-styles": [
528
+ "error",
529
+ {
530
+ allow: [
531
+ "left",
532
+ "top",
533
+ "width",
534
+ "height",
535
+ "background",
536
+ "backgroundColor",
537
+ "borderColor",
538
+ "color",
539
+ "gridTemplateColumns",
540
+ "paddingLeft"
541
+ ]
542
+ }
543
+ ],
544
+ "shadcn/no-unknown-classes": "error",
545
+ "shadcn/require-static-classes": "error"
432
546
  }
433
547
  });
434
548
  var js_plugins_default = config;
435
- var selectJsPlugins = (pluginNames) => {
549
+ var selectJsPlugins2 = (pluginNames) => {
436
550
  const names = new Set(pluginNames);
437
551
  const isSelectedRule = ([ruleName]) => {
438
552
  const [pluginName = ""] = ruleName.split("/");
@@ -449,4 +563,4 @@ var selectJsPlugins = (pluginNames) => {
449
563
  });
450
564
  };
451
565
 
452
- export { jsPluginSettings, selectJsPlugins, js_plugins_default };
566
+ 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-5cy3qjw4.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/**"],