@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,5 +1,3 @@
1
- import"../../../chunk-5wgwscd0.js";
2
-
3
1
  // node_modules/@oxlint/plugins/index.js
4
2
  function definePlugin(plugin) {
5
3
  return plugin;
@@ -332,11 +330,11 @@ function skipComment(source, index) {
332
330
  if (char !== "/" || next !== "/" && next !== "*")
333
331
  return index;
334
332
  if (next === "/") {
335
- let end2 = index + 2;
336
- while (end2 < source.length && source[end2] !== `
333
+ let end = index + 2;
334
+ while (end < source.length && source[end] !== `
337
335
  `)
338
- end2 += 1;
339
- return end2;
336
+ end += 1;
337
+ return end;
340
338
  }
341
339
  let end = index + 2;
342
340
  while (end < source.length && !(source[end] === "*" && source[end + 1] === "/"))
@@ -685,9 +683,9 @@ var preferAlias = defineRule({
685
683
  report(toRelativeImport(importerDirectory, absoluteImport), "import");
686
684
  return;
687
685
  }
688
- const match2 = findShorterAlias(absoluteImport, basePath, aliasPatterns, importPath);
689
- if (match2)
690
- report(match2, "shortAlias");
686
+ const match = findShorterAlias(absoluteImport, basePath, aliasPatterns, importPath);
687
+ if (match)
688
+ report(match, "shortAlias");
691
689
  return;
692
690
  }
693
691
  if (isSameDirectory(absoluteImport, importerDirectory))
@@ -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
  export {
6
- ignorePatterns
5
+ ignorePatterns2 as ignorePatterns
7
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nekoyasuii/config",
3
- "version": "0.1.4",
3
+ "version": "0.1.7",
4
4
  "description": "Shared TypeScript, Oxlint, and Oxfmt configs for my projects.",
5
5
  "files": [
6
6
  "dist",
@@ -18,11 +18,6 @@
18
18
  "import": "./dist/tools/oxlint/config/index.js",
19
19
  "default": "./dist/tools/oxlint/config/index.js"
20
20
  },
21
- "./oxlint/anti-slop": {
22
- "types": "./dist/tools/oxlint/config/anti-slop/index.d.ts",
23
- "import": "./dist/tools/oxlint/config/anti-slop/index.js",
24
- "default": "./dist/tools/oxlint/config/anti-slop/index.js"
25
- },
26
21
  "./oxlint/rules": {
27
22
  "types": "./dist/tools/oxlint/rules/index.d.ts",
28
23
  "import": "./dist/tools/oxlint/rules/index.js",
@@ -83,8 +78,8 @@
83
78
  "check": "bun run lint && bun run fmt:check && bun run typecheck && bun run test"
84
79
  },
85
80
  "devDependencies": {
86
- "@oxlint/plugins": "^1.80.0",
87
- "@types/bun": "^1.4.0"
81
+ "@oxlint/plugins": "^1.85.0",
82
+ "@types/bun": "^1.4.2"
88
83
  },
89
84
  "peerDependencies": {
90
85
  "eslint-plugin-sonarjs": ">= 4.2.0",
@@ -1,4 +0,0 @@
1
- import { createRequire } from "node:module";
2
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
3
-
4
- export { __require };
@@ -1,32 +0,0 @@
1
- // tools/oxlint/config/no-comment-slop/index.ts
2
- import { existsSync } from "node:fs";
3
- import { fileURLToPath } from "node:url";
4
- import { defineConfig } from "oxlint";
5
- var pluginCandidates = [
6
- new URL("plugin.js", import.meta.url),
7
- new URL("tools/oxlint/config/no-comment-slop/plugin.js", import.meta.url)
8
- ];
9
- var noCommentSlopPluginPath = fileURLToPath(pluginCandidates.find((candidate) => existsSync(candidate)) ?? pluginCandidates[0]);
10
- var noCommentSlopConfig = defineConfig({
11
- jsPlugins: [
12
- {
13
- name: "no-comment-slop",
14
- specifier: noCommentSlopPluginPath
15
- }
16
- ],
17
- rules: {
18
- "no-comment-slop/max-comment-lines": "error",
19
- "no-comment-slop/no-banner-comment": "error",
20
- "no-comment-slop/no-trailing-comment": "error",
21
- "no-comment-slop/prefer-jsdoc-for-exports": "error",
22
- "no-comment-slop/prefer-jsdoc-for-members": "error",
23
- "no-comment-slop/require-member-docs": "error",
24
- "no-comment-slop/multiline-jsdoc-format": "error",
25
- "no-comment-slop/no-trailing-period": "error",
26
- "no-comment-slop/no-em-dash": "error",
27
- "no-comment-slop/no-jargon": "error",
28
- "no-comment-slop/no-foreign-syntax": "error"
29
- }
30
- });
31
-
32
- export { noCommentSlopConfig };
@@ -1,38 +0,0 @@
1
- // tools/oxlint/config/anti-slop/index.ts
2
- import { existsSync } from "node:fs";
3
- import { fileURLToPath } from "node:url";
4
- import { defineConfig } from "oxlint";
5
- var pluginCandidates = [
6
- new URL("plugin.js", import.meta.url),
7
- new URL("tools/oxlint/config/anti-slop/plugin.js", import.meta.url)
8
- ];
9
- var antiSlopPluginPath = fileURLToPath(pluginCandidates.find((candidate) => existsSync(candidate)) ?? pluginCandidates[0]);
10
- var antiSlopConfig = defineConfig({
11
- jsPlugins: [
12
- {
13
- name: "anti-slop",
14
- specifier: antiSlopPluginPath
15
- }
16
- ],
17
- rules: {
18
- "anti-slop/no-chained-type-assertions": "error",
19
- "anti-slop/no-conditional-empty-object-spread": "error",
20
- "anti-slop/no-known-value-widening": "error",
21
- "anti-slop/no-module-mocking": "error",
22
- "anti-slop/no-object-parameters": "error",
23
- "anti-slop/no-reflect-apply": "error",
24
- "anti-slop/no-reflect-get": "error",
25
- "anti-slop/no-runtime-typeof": ["error", { allowInTypeGuards: true }],
26
- "anti-slop/no-shape-in-symbol-names": "error",
27
- "anti-slop/no-unknown-parameters": "error",
28
- "anti-slop/no-unknown-returns": "error",
29
- "anti-slop/no-unknown-type-aliases": "error",
30
- "anti-slop/no-unsafe-dictionary-type": "error",
31
- "anti-slop/no-widen-then-assert": "error",
32
- "anti-slop/require-safety-comment-for-type-assertion": "error",
33
- "typescript/consistent-indexed-object-style": "off",
34
- "unicorn/no-immediate-mutation": "off"
35
- }
36
- });
37
-
38
- export { antiSlopConfig };
@@ -1,42 +0,0 @@
1
- export declare const antiSlopConfig: {
2
- jsPlugins: {
3
- name: string;
4
- specifier: string;
5
- }[];
6
- rules: {
7
- "anti-slop/no-chained-type-assertions": "error";
8
- "anti-slop/no-conditional-empty-object-spread": "error";
9
- "anti-slop/no-known-value-widening": "error";
10
- "anti-slop/no-module-mocking": "error";
11
- "anti-slop/no-object-parameters": "error";
12
- "anti-slop/no-reflect-apply": "error";
13
- "anti-slop/no-reflect-get": "error";
14
- /**
15
- * allowInTypeGuards exempts `typeof` inside type predicate functions
16
- * ((x): x is T): predicates are the named-boundary pattern the rule
17
- * pushes toward, and hand-rolled JSON/boundary validation has no other
18
- * way to write the check (dmmulroy/anti-slop#10)
19
- */
20
- "anti-slop/no-runtime-typeof": ["error", {
21
- allowInTypeGuards: boolean;
22
- }];
23
- "anti-slop/no-shape-in-symbol-names": "error";
24
- "anti-slop/no-unknown-parameters": "error";
25
- "anti-slop/no-unknown-returns": "error";
26
- "anti-slop/no-unknown-type-aliases": "error";
27
- "anti-slop/no-unsafe-dictionary-type": "error";
28
- "anti-slop/no-widen-then-assert": "error";
29
- "anti-slop/require-safety-comment-for-type-assertion": "error";
30
- /**
31
- * Core rules that pinch against anti-slop when both are enabled:
32
- * consistent-indexed-object-style's autofix rewrites index-signature
33
- * interfaces into `Record` aliases, which no-known-value-widening
34
- * resolves and re-flags (a fix/break loop)
35
- *
36
- * no-immediate-mutation bans the empty-accumulator escape from the same
37
- * rule. Extending this preset after core turns them off by default
38
- */
39
- "typescript/consistent-indexed-object-style": "off";
40
- "unicorn/no-immediate-mutation": "off";
41
- };
42
- };
@@ -1,7 +0,0 @@
1
- import {
2
- antiSlopConfig
3
- } from "../../../../chunk-c8jq73qx.js";
4
- import"../../../../chunk-5wgwscd0.js";
5
- export {
6
- antiSlopConfig
7
- };
@@ -1,19 +0,0 @@
1
- export declare const noCommentSlopConfig: {
2
- jsPlugins: {
3
- name: string;
4
- specifier: string;
5
- }[];
6
- rules: {
7
- "no-comment-slop/max-comment-lines": "error";
8
- "no-comment-slop/no-banner-comment": "error";
9
- "no-comment-slop/no-trailing-comment": "error";
10
- "no-comment-slop/prefer-jsdoc-for-exports": "error";
11
- "no-comment-slop/prefer-jsdoc-for-members": "error";
12
- "no-comment-slop/require-member-docs": "error";
13
- "no-comment-slop/multiline-jsdoc-format": "error";
14
- "no-comment-slop/no-trailing-period": "error";
15
- "no-comment-slop/no-em-dash": "error";
16
- "no-comment-slop/no-jargon": "error";
17
- "no-comment-slop/no-foreign-syntax": "error";
18
- };
19
- };
@@ -1,7 +0,0 @@
1
- import {
2
- noCommentSlopConfig
3
- } from "../../../../chunk-97s6xvc6.js";
4
- import"../../../../chunk-5wgwscd0.js";
5
- export {
6
- noCommentSlopConfig
7
- };