@danieljvdm/dev-kit 0.11.1 → 0.12.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.
Files changed (75) hide show
  1. package/README.md +70 -76
  2. package/dev-kit.example.jsonc +0 -4
  3. package/package.json +10 -6
  4. package/schema/dev-kit.schema.json +1 -46
  5. package/skills/build-effect-apis/SKILL.md +77 -0
  6. package/skills/build-effect-apis/agents/openai.yaml +4 -0
  7. package/skills/build-effect-apis/references/cloudflare-workers.md +71 -0
  8. package/skills/build-effect-apis/references/effect-atom-client.md +161 -0
  9. package/skills/build-effect-apis/references/effect-atom-lifecycle.md +78 -0
  10. package/skills/build-effect-apis/references/effect-atom-testing.md +74 -0
  11. package/skills/build-effect-apis/references/runtime-assembly.md +56 -0
  12. package/skills/build-effect-apis/references/server-and-middleware.md +174 -0
  13. package/skills/build-effect-apis/references/shared-contracts.md +108 -0
  14. package/skills/build-effect-apis/references/tanstack-start.md +86 -0
  15. package/skills/build-effect-apis/references/verification.md +50 -0
  16. package/skills/dev-kit/SKILL.md +61 -49
  17. package/skills/effect-architecture-audit/SKILL.md +26 -0
  18. package/skills/effect-architecture-audit/agents/openai.yaml +4 -0
  19. package/skills/effect-architecture-audit/references/service-and-boundary-audit.md +150 -0
  20. package/skills/effect-ts/SKILL.md +21 -256
  21. package/skills/effect-ts/agents/openai.yaml +3 -3
  22. package/skills/testing/SKILL.md +5 -0
  23. package/src/catalog-manager.ts +16 -17
  24. package/src/catalog.ts +71 -16
  25. package/src/effect-source.ts +46 -24
  26. package/src/effect-tsgo.ts +49 -24
  27. package/src/gitignore.ts +5 -5
  28. package/src/index.ts +0 -6
  29. package/src/manifest.ts +0 -34
  30. package/src/node-symbolic-link.ts +2 -2
  31. package/src/oxfmt.js +5 -0
  32. package/src/oxfmt.ts +5 -0
  33. package/src/oxlint.js +10 -2
  34. package/src/oxlint.ts +10 -2
  35. package/src/package-skill-source.ts +51 -59
  36. package/src/path-digest.ts +7 -7
  37. package/src/project-package.ts +8 -7
  38. package/src/project-process-lock.ts +17 -12
  39. package/src/project-state.ts +1 -1
  40. package/src/skill-manager.ts +16 -14
  41. package/src/skill-selector.ts +12 -0
  42. package/src/sync.ts +170 -120
  43. package/src/tool-ignore-patterns.js +9 -0
  44. package/src/tool-ignore-patterns.ts +15 -0
  45. package/src/vendor.ts +67 -61
  46. package/src/vite-plus-dependency.ts +10 -11
  47. package/src/vite-plus-hooks.ts +24 -14
  48. package/src/vite-plus-quality.ts +21 -172
  49. package/src/vite-plus.js +81 -0
  50. package/src/vite-plus.ts +102 -0
  51. package/templates/AGENTS.md +1 -1
  52. package/templates/vite-plus/github-actions-check.yml +2 -4
  53. package/skills/effect-ts/UPSTREAM.md +0 -28
  54. package/skills/effect-ts/references/atom-cache-lifecycle.md +0 -72
  55. package/skills/effect-ts/references/atom-http-and-invalidation.md +0 -93
  56. package/skills/effect-ts/references/atom-tanstack-start.md +0 -69
  57. package/skills/effect-ts/references/atom-testing.md +0 -63
  58. package/skills/effect-ts/references/audit-services.md +0 -144
  59. package/skills/effect-ts/references/features.md +0 -525
  60. package/skills/effect-ts/references/guide-atom-data-fetching.md +0 -28
  61. package/skills/effect-ts/references/guide-cli.md +0 -107
  62. package/skills/effect-ts/references/guide-datetime.md +0 -72
  63. package/skills/effect-ts/references/guide-effect.md +0 -440
  64. package/skills/effect-ts/references/guide-error-handling.md +0 -565
  65. package/skills/effect-ts/references/guide-http-boundaries.md +0 -55
  66. package/skills/effect-ts/references/guide-layers.md +0 -989
  67. package/skills/effect-ts/references/guide-observability.md +0 -746
  68. package/skills/effect-ts/references/guide-retries.md +0 -434
  69. package/skills/effect-ts/references/guide-schedule.md +0 -343
  70. package/skills/effect-ts/references/guide-schema.md +0 -664
  71. package/skills/effect-ts/references/guide-sql.md +0 -536
  72. package/skills/effect-ts/references/guide-testing.md +0 -532
  73. package/skills/effect-ts/references/guide-type-safety-and-boundaries.md +0 -131
  74. package/skills/effect-ts/references/version-and-source.md +0 -86
  75. package/templates/vite-plus/vite.config.ts +0 -22
@@ -5,7 +5,7 @@ import { printStatus, withSpinner } from "./cli-ui.ts";
5
5
  import { acquireProjectProcessLock } from "./project-process-lock.ts";
6
6
  import { isTypeScriptPackageName } from "./typescript-package-name.ts";
7
7
 
8
- export const EFFECT_TSGO_VERSION = "0.24.3";
8
+ export const EFFECT_TSGO_VERSION = "0.33.0";
9
9
  export const EFFECT_TSGO_TYPESCRIPT_VERSION = "7.0.2";
10
10
  export const EFFECT_TSGO_PLUGIN_NAME = "@effect/language-service";
11
11
 
@@ -18,6 +18,7 @@ export type EffectTsgoPatchOptions = {
18
18
 
19
19
  export type EffectTsgoPatchPlan = {
20
20
  readonly alreadyPatched: boolean;
21
+ readonly unpatchArgs?: ReadonlyArray<string>;
21
22
  readonly projectDir: string;
22
23
  readonly executable: string;
23
24
  readonly args: ReadonlyArray<string>;
@@ -26,7 +27,7 @@ export type EffectTsgoPatchPlan = {
26
27
  readonly typescriptVersion: string;
27
28
  };
28
29
 
29
- export class EffectTsgoDependencyError extends Schema.TaggedErrorClass<EffectTsgoDependencyError>()(
30
+ export class EffectTsgoDependencyError extends Schema.TaggedError<EffectTsgoDependencyError>()(
30
31
  "EffectTsgoDependencyError",
31
32
  {
32
33
  packageName: Schema.String,
@@ -41,7 +42,7 @@ export class EffectTsgoDependencyError extends Schema.TaggedErrorClass<EffectTsg
41
42
  }
42
43
  }
43
44
 
44
- export class EffectTsgoPatchCommandError extends Schema.TaggedErrorClass<EffectTsgoPatchCommandError>()(
45
+ export class EffectTsgoPatchCommandError extends Schema.TaggedError<EffectTsgoPatchCommandError>()(
45
46
  "EffectTsgoPatchCommandError",
46
47
  {
47
48
  command: Schema.String,
@@ -56,7 +57,7 @@ export class EffectTsgoPatchCommandError extends Schema.TaggedErrorClass<EffectT
56
57
  }
57
58
  }
58
59
 
59
- export class InvalidEffectTsgoPackageNameError extends Schema.TaggedErrorClass<InvalidEffectTsgoPackageNameError>()(
60
+ export class InvalidEffectTsgoPackageNameError extends Schema.TaggedError<InvalidEffectTsgoPackageNameError>()(
60
61
  "InvalidEffectTsgoPackageNameError",
61
62
  { packageName: Schema.String },
62
63
  ) {
@@ -82,15 +83,15 @@ const readExactPackageVersion = Effect.fn("readExactEffectTsgoPackageVersion")(f
82
83
  .readFileString(manifestPath)
83
84
  .pipe(
84
85
  Effect.catchReason("PlatformError", "NotFound", () =>
85
- Effect.fail(new EffectTsgoDependencyError({ packageName, expectedVersion })),
86
+ Effect.fail(EffectTsgoDependencyError.make({ packageName, expectedVersion })),
86
87
  ),
87
88
  );
88
- const manifest = yield* Schema.decodeUnknownEffect(PackageVersionSchema)(contents).pipe(
89
- Effect.mapError(() => new EffectTsgoDependencyError({ packageName, expectedVersion })),
89
+ const manifest = yield* Schema.decodeEffect(PackageVersionSchema)(contents).pipe(
90
+ Effect.mapError(() => EffectTsgoDependencyError.make({ packageName, expectedVersion })),
90
91
  );
91
92
 
92
93
  if (manifest.version !== expectedVersion) {
93
- return yield* new EffectTsgoDependencyError({
94
+ return yield* EffectTsgoDependencyError.make({
94
95
  packageName,
95
96
  expectedVersion,
96
97
  actualVersion: manifest.version,
@@ -115,7 +116,7 @@ const resolveEffectTsgoExecutable = Effect.fn("resolveEffectTsgoExecutable")(fun
115
116
  if (yield* fs.exists(candidate)) return candidate;
116
117
  }
117
118
 
118
- return yield* new EffectTsgoDependencyError({
119
+ return yield* EffectTsgoDependencyError.make({
119
120
  packageName: "@effect/tsgo",
120
121
  expectedVersion: EFFECT_TSGO_VERSION,
121
122
  });
@@ -140,7 +141,7 @@ const findNodeModulesRoot = (path: Path.Path, packageJsonPath: string): string |
140
141
  }
141
142
  };
142
143
 
143
- const isEffectTsgoPatched = Effect.fn("isEffectTsgoPatched")(function* (
144
+ const inspectEffectTsgoPatch = Effect.fn("inspectEffectTsgoPatch")(function* (
144
145
  projectDir: string,
145
146
  typescriptPackage: string,
146
147
  ) {
@@ -153,22 +154,28 @@ const isEffectTsgoPatched = Effect.fn("isEffectTsgoPatched")(function* (
153
154
  const typescriptNodeModules = findNodeModulesRoot(path, typescriptPackageJson);
154
155
  const effectNodeModules = findNodeModulesRoot(path, effectTsgoPackageJson);
155
156
 
156
- if (typescriptNodeModules === undefined || effectNodeModules === undefined) return false;
157
+ if (typescriptNodeModules === undefined || effectNodeModules === undefined) {
158
+ return { alreadyPatched: false, hasBackup: false };
159
+ }
157
160
 
158
161
  const typescriptScope = path.join(typescriptNodeModules, "@typescript");
159
162
  const effectScope = path.join(effectNodeModules, "@effect");
160
163
 
161
- if (!(yield* fs.exists(typescriptScope)) || !(yield* fs.exists(effectScope))) return false;
164
+ if (!(yield* fs.exists(typescriptScope)) || !(yield* fs.exists(effectScope))) {
165
+ return { alreadyPatched: false, hasBackup: false };
166
+ }
162
167
 
163
168
  const executableName = path.sep === "\\" ? "tsc.exe" : "tsc";
164
169
  const effectExecutableNames =
165
170
  path.sep === "\\" ? ["tsc.exe", "tsc-next.exe"] : ["tsc", "tsc-next"];
171
+ let hasBackup = false;
166
172
 
167
173
  for (const entry of yield* fs.readDirectory(typescriptScope)) {
168
174
  if (!entry.startsWith("typescript-")) continue;
169
175
  const platform = entry.slice("typescript-".length);
170
176
  const installedPath = path.join(typescriptScope, entry, "lib", executableName);
171
177
 
178
+ if (yield* fs.exists(`${installedPath}.original`)) hasBackup = true;
172
179
  if (!(yield* fs.exists(installedPath))) continue;
173
180
  const installedDigest = yield* digestFileContents(installedPath);
174
181
 
@@ -184,12 +191,12 @@ const isEffectTsgoPatched = Effect.fn("isEffectTsgoPatched")(function* (
184
191
  (yield* fs.exists(effectBinaryPath)) &&
185
192
  installedDigest === (yield* digestFileContents(effectBinaryPath))
186
193
  ) {
187
- return true;
194
+ return { alreadyPatched: true, hasBackup };
188
195
  }
189
196
  }
190
197
  }
191
198
 
192
- return false;
199
+ return { alreadyPatched: false, hasBackup };
193
200
  });
194
201
 
195
202
  export const planEffectTsgoPatch = Effect.fn("planEffectTsgoPatch")(function* (
@@ -201,7 +208,7 @@ export const planEffectTsgoPatch = Effect.fn("planEffectTsgoPatch")(function* (
201
208
  const typescriptPackage = options.typescriptPackage ?? "typescript";
202
209
 
203
210
  if (!isTypeScriptPackageName(typescriptPackage)) {
204
- return yield* new InvalidEffectTsgoPackageNameError({ packageName: typescriptPackage });
211
+ return yield* InvalidEffectTsgoPackageNameError.make({ packageName: typescriptPackage });
205
212
  }
206
213
  const effectTsgoVersion = yield* readExactPackageVersion(
207
214
  projectDir,
@@ -214,15 +221,22 @@ export const planEffectTsgoPatch = Effect.fn("planEffectTsgoPatch")(function* (
214
221
  EFFECT_TSGO_TYPESCRIPT_VERSION,
215
222
  );
216
223
  const executable = yield* resolveEffectTsgoExecutable(projectDir);
224
+ const patchState = yield* inspectEffectTsgoPatch(projectDir, typescriptPackage);
225
+ const typescriptPackageArgs =
226
+ typescriptPackage === "typescript" ? [] : ["--typescript-package", typescriptPackage];
217
227
 
218
228
  return {
219
- alreadyPatched: yield* isEffectTsgoPatched(projectDir, typescriptPackage),
229
+ alreadyPatched: patchState.alreadyPatched,
230
+ ...(patchState.hasBackup && !patchState.alreadyPatched
231
+ ? { unpatchArgs: ["unpatch", "--typescript", ...typescriptPackageArgs] }
232
+ : {}),
220
233
  projectDir,
221
234
  executable,
222
235
  args: [
223
236
  "patch",
237
+ "--typescript",
224
238
  ...(options.force ? ["--force"] : []),
225
- ...(typescriptPackage === "typescript" ? [] : ["--typescript-package", typescriptPackage]),
239
+ ...typescriptPackageArgs,
226
240
  ],
227
241
  effectTsgoVersion,
228
242
  typescriptPackage,
@@ -230,12 +244,13 @@ export const planEffectTsgoPatch = Effect.fn("planEffectTsgoPatch")(function* (
230
244
  } satisfies EffectTsgoPatchPlan;
231
245
  });
232
246
 
233
- export const applyEffectTsgoPatchPlan = Effect.fn("applyEffectTsgoPatchPlan")(function* (
234
- plan: EffectTsgoPatchPlan,
247
+ const runEffectTsgoCommand = Effect.fn("runEffectTsgoCommand")(function* (
248
+ executable: string,
249
+ args: ReadonlyArray<string>,
250
+ projectDir: string,
235
251
  ) {
236
- if (plan.alreadyPatched) return;
237
- const child = yield* ChildProcess.make(plan.executable, plan.args, {
238
- cwd: plan.projectDir,
252
+ const child = yield* ChildProcess.make(executable, args, {
253
+ cwd: projectDir,
239
254
  stderr: "pipe",
240
255
  stdout: "pipe",
241
256
  });
@@ -246,14 +261,24 @@ export const applyEffectTsgoPatchPlan = Effect.fn("applyEffectTsgoPatchPlan")(fu
246
261
  const trimmed = output.trim();
247
262
 
248
263
  if (exitCode !== 0) {
249
- return yield* new EffectTsgoPatchCommandError({
250
- command: [plan.executable, ...plan.args].join(" "),
264
+ return yield* EffectTsgoPatchCommandError.make({
265
+ command: [executable, ...args].join(" "),
251
266
  exitCode,
252
267
  output: trimmed,
253
268
  });
254
269
  }
255
270
  });
256
271
 
272
+ export const applyEffectTsgoPatchPlan = Effect.fn("applyEffectTsgoPatchPlan")(function* (
273
+ plan: EffectTsgoPatchPlan,
274
+ ) {
275
+ if (plan.alreadyPatched) return;
276
+ if (plan.unpatchArgs !== undefined) {
277
+ yield* runEffectTsgoCommand(plan.executable, plan.unpatchArgs, plan.projectDir);
278
+ }
279
+ yield* runEffectTsgoCommand(plan.executable, plan.args, plan.projectDir);
280
+ });
281
+
257
282
  export const patchEffectTsgo = Effect.fn("patchEffectTsgo")(function* (
258
283
  options: EffectTsgoPatchOptions = {},
259
284
  ) {
package/src/gitignore.ts CHANGED
@@ -22,7 +22,7 @@ export type GitignorePatch = {
22
22
  readonly added: ReadonlyArray<string>;
23
23
  };
24
24
 
25
- export class UnsafeGitignorePathError extends Schema.TaggedErrorClass<UnsafeGitignorePathError>()(
25
+ export class UnsafeGitignorePathError extends Schema.TaggedError<UnsafeGitignorePathError>()(
26
26
  "UnsafeGitignorePathError",
27
27
  {
28
28
  path: Schema.String,
@@ -34,7 +34,7 @@ export class UnsafeGitignorePathError extends Schema.TaggedErrorClass<UnsafeGiti
34
34
  }
35
35
  }
36
36
 
37
- export class GitignoreConflictError extends Schema.TaggedErrorClass<GitignoreConflictError>()(
37
+ export class GitignoreConflictError extends Schema.TaggedError<GitignoreConflictError>()(
38
38
  "GitignoreConflictError",
39
39
  { path: Schema.String },
40
40
  ) {
@@ -94,7 +94,7 @@ const planGitignorePatch = Effect.fn("planGitignorePatch")(function* (
94
94
  const observation = yield* observeSymbolicLink(gitignorePath);
95
95
 
96
96
  if (observation.kind === "symlink") {
97
- return yield* new UnsafeGitignorePathError({
97
+ return yield* UnsafeGitignorePathError.make({
98
98
  path: gitignorePath,
99
99
  reason: "the file is a symlink",
100
100
  });
@@ -107,7 +107,7 @@ const planGitignorePatch = Effect.fn("planGitignorePatch")(function* (
107
107
  const info = yield* fs.stat(gitignorePath);
108
108
 
109
109
  if (info.type !== "File") {
110
- return yield* new UnsafeGitignorePathError({
110
+ return yield* UnsafeGitignorePathError.make({
111
111
  path: gitignorePath,
112
112
  reason: "the path is not a regular file",
113
113
  });
@@ -152,7 +152,7 @@ const applyGitignorePatch = Effect.fn("applyGitignorePatch")(function* (
152
152
  : currentObservation.kind !== "missing";
153
153
 
154
154
  if (changed) {
155
- return yield* new GitignoreConflictError({ path: patch.path });
155
+ return yield* GitignoreConflictError.make({ path: patch.path });
156
156
  }
157
157
 
158
158
  let backedUp = false;
package/src/index.ts CHANGED
@@ -11,20 +11,14 @@ export {
11
11
  EffectTsgoSetupSchema,
12
12
  type HarnessTarget,
13
13
  TargetConfigSchema,
14
- type VitePlusQualityConfigSetup,
15
- VitePlusQualityConfigSetupSchema,
16
14
  type VitePlusQualitySetup,
17
15
  VitePlusQualitySetupSchema,
18
- type VitePlusQualityTypecheckSetup,
19
- VitePlusQualityTypecheckSetupSchema,
20
16
  type VitePlusQualityWorkflowSetup,
21
17
  VitePlusQualityWorkflowSetupSchema,
22
18
  type VitePlusQualityWorkflowStep,
23
19
  VitePlusQualityWorkflowStepSchema,
24
20
  type VitePlusSetup,
25
21
  VitePlusSetupSchema,
26
- type VitePlusTypecheckStrategy,
27
- VitePlusTypecheckStrategySchema,
28
22
  } from "./manifest.ts";
29
23
  export {
30
24
  applyEffectSourcePlan,
package/src/manifest.ts CHANGED
@@ -53,22 +53,6 @@ export const VitePlusHooksSetupSchema = Schema.Struct({
53
53
  enabled: Schema.optional(Schema.Boolean),
54
54
  });
55
55
 
56
- export const VitePlusTypecheckStrategySchema = Schema.Literals(["single-project", "workspace"]);
57
- export type VitePlusTypecheckStrategy = typeof VitePlusTypecheckStrategySchema.Type;
58
-
59
- export const VitePlusQualityTypecheckSetupSchema = Schema.Struct({
60
- strategy: Schema.optional(VitePlusTypecheckStrategySchema),
61
- concurrency: Schema.optional(Schema.Int),
62
- packages: Schema.optional(Schema.Array(Schema.String)),
63
- });
64
- export type VitePlusQualityTypecheckSetup = typeof VitePlusQualityTypecheckSetupSchema.Type;
65
-
66
- export const VitePlusQualityConfigSetupSchema = Schema.Struct({
67
- enabled: Schema.optional(Schema.Boolean),
68
- typecheck: Schema.optional(VitePlusQualityTypecheckSetupSchema),
69
- });
70
- export type VitePlusQualityConfigSetup = typeof VitePlusQualityConfigSetupSchema.Type;
71
-
72
56
  export const VitePlusQualityWorkflowStepSchema = Schema.Struct({
73
57
  name: Schema.String,
74
58
  run: Schema.Array(Schema.String),
@@ -83,7 +67,6 @@ export const VitePlusQualityWorkflowSetupSchema = Schema.Struct({
83
67
  export type VitePlusQualityWorkflowSetup = typeof VitePlusQualityWorkflowSetupSchema.Type;
84
68
 
85
69
  export const VitePlusQualitySetupSchema = Schema.Struct({
86
- config: Schema.optional(VitePlusQualityConfigSetupSchema),
87
70
  workflow: Schema.optional(VitePlusQualityWorkflowSetupSchema),
88
71
  });
89
72
  export type VitePlusQualitySetup = typeof VitePlusQualitySetupSchema.Type;
@@ -153,14 +136,6 @@ export type NormalizedManifest = {
153
136
  readonly enabled: boolean;
154
137
  };
155
138
  readonly quality: {
156
- readonly config: {
157
- readonly enabled: boolean;
158
- readonly typecheck: {
159
- readonly strategy: VitePlusTypecheckStrategy;
160
- readonly concurrency: number;
161
- readonly packages: ReadonlyArray<string>;
162
- };
163
- };
164
139
  readonly workflow: {
165
140
  readonly enabled: boolean;
166
141
  readonly beforeChecks: ReadonlyArray<VitePlusQualityWorkflowStep>;
@@ -201,7 +176,6 @@ export const normalizeManifest = (manifest: DevKitManifest): NormalizedManifest
201
176
  }
202
177
  }
203
178
  const quality = manifest.setup?.vitePlus?.quality;
204
- const typecheck = quality?.config?.typecheck;
205
179
 
206
180
  return {
207
181
  exclude: manifest.exclude ?? [],
@@ -230,14 +204,6 @@ export const normalizeManifest = (manifest: DevKitManifest): NormalizedManifest
230
204
  enabled: manifest.setup?.vitePlus?.hooks?.enabled ?? false,
231
205
  },
232
206
  quality: {
233
- config: {
234
- enabled: quality?.config?.enabled ?? false,
235
- typecheck: {
236
- strategy: typecheck?.strategy ?? "single-project",
237
- concurrency: typecheck?.concurrency ?? 4,
238
- packages: typecheck?.packages ?? [],
239
- },
240
- },
241
207
  workflow: {
242
208
  enabled: quality?.workflow?.enabled ?? false,
243
209
  beforeChecks: quality?.workflow?.beforeChecks ?? [],
@@ -4,8 +4,8 @@ export type SymbolicLinkObservation =
4
4
  | { readonly kind: "missing" | "not-symlink" }
5
5
  | { readonly kind: "symlink"; readonly target: string };
6
6
 
7
- // Effect beta.102's Node FileSystem adapter maps readlink(2) EINVAL to Unknown.
8
- // Keep that runtime-specific normalization at this narrow adapter boundary.
7
+ // Effect's Node FileSystem adapter maps readlink(2) EINVAL to Unknown. Keep
8
+ // that runtime-specific normalization at this narrow adapter boundary.
9
9
  const isNotSymbolicLink = (error: PlatformError.PlatformError): boolean => {
10
10
  if (error.reason._tag !== "Unknown") return false;
11
11
  const cause = error.reason.cause;
package/src/oxfmt.js CHANGED
@@ -4,9 +4,14 @@
4
4
  * This file is intentionally plain JavaScript because Node does not strip
5
5
  * TypeScript from packages in node_modules when tools load their config.
6
6
  */
7
+ import { devKitToolIgnorePatterns } from "./tool-ignore-patterns.js";
8
+
9
+ export { devKitToolIgnorePatterns } from "./tool-ignore-patterns.js";
10
+
7
11
  export const recommendedOxfmtConfig = {
8
12
  arrowParens: "always",
9
13
  endOfLine: "lf",
14
+ ignorePatterns: [...devKitToolIgnorePatterns],
10
15
  printWidth: 100,
11
16
  semi: true,
12
17
  singleQuote: false,
package/src/oxfmt.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import type { OxfmtConfig } from "oxfmt";
2
2
 
3
+ import { devKitToolIgnorePatterns } from "./tool-ignore-patterns.ts";
4
+
5
+ export { devKitToolIgnorePatterns } from "./tool-ignore-patterns.ts";
6
+
3
7
  /**
4
8
  * Canonical formatting defaults for standalone Oxfmt and Vite+ projects.
5
9
  *
@@ -9,6 +13,7 @@ import type { OxfmtConfig } from "oxfmt";
9
13
  export const recommendedOxfmtConfig = {
10
14
  arrowParens: "always",
11
15
  endOfLine: "lf",
16
+ ignorePatterns: [...devKitToolIgnorePatterns],
12
17
  printWidth: 100,
13
18
  semi: true,
14
19
  singleQuote: false,
package/src/oxlint.js CHANGED
@@ -4,7 +4,12 @@
4
4
  * This file is intentionally plain JavaScript because Node does not strip
5
5
  * TypeScript from packages in node_modules when Vite+ loads vite.config.ts.
6
6
  */
7
+ import { devKitToolIgnorePatterns } from "./tool-ignore-patterns.js";
8
+
9
+ export { devKitToolIgnorePatterns } from "./tool-ignore-patterns.js";
10
+
7
11
  export const recommendedOxlintConfig = {
12
+ ignorePatterns: [...devKitToolIgnorePatterns],
8
13
  options: {
9
14
  typeAware: true,
10
15
  },
@@ -24,7 +29,7 @@ export const recommendedOxlintConfig = {
24
29
  "import/default": "off",
25
30
  "import/namespace": "off",
26
31
  "import/no-cycle": "error",
27
- "import/no-duplicates": "error",
32
+ "import/no-duplicates": ["error", { preferInline: true }],
28
33
  "import/no-self-import": "error",
29
34
  "react/exhaustive-deps": "error",
30
35
  "react/rules-of-hooks": "error",
@@ -38,7 +43,10 @@ export const recommendedOxlintConfig = {
38
43
  },
39
44
  { blankLine: "always", prev: "*", next: "return" },
40
45
  ],
41
- "typescript/consistent-type-imports": "error",
46
+ "typescript/consistent-type-imports": [
47
+ "error",
48
+ { fixStyle: "inline-type-imports", prefer: "type-imports" },
49
+ ],
42
50
  "typescript/no-floating-promises": "off",
43
51
  "typescript/no-explicit-any": "error",
44
52
  "typescript/no-misused-spread": "off",
package/src/oxlint.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import type { OxlintConfig } from "oxlint";
2
2
 
3
+ import { devKitToolIgnorePatterns } from "./tool-ignore-patterns.ts";
4
+
5
+ export { devKitToolIgnorePatterns } from "./tool-ignore-patterns.ts";
6
+
3
7
  /**
4
8
  * High-signal Oxlint defaults for TypeScript projects.
5
9
  *
@@ -8,6 +12,7 @@ import type { OxlintConfig } from "oxlint";
8
12
  * without losing nested configuration.
9
13
  */
10
14
  export const recommendedOxlintConfig = {
15
+ ignorePatterns: [...devKitToolIgnorePatterns],
11
16
  options: {
12
17
  typeAware: true,
13
18
  },
@@ -27,7 +32,7 @@ export const recommendedOxlintConfig = {
27
32
  "import/default": "off",
28
33
  "import/namespace": "off",
29
34
  "import/no-cycle": "error",
30
- "import/no-duplicates": "error",
35
+ "import/no-duplicates": ["error", { preferInline: true }],
31
36
  "import/no-self-import": "error",
32
37
  "react/exhaustive-deps": "error",
33
38
  "react/rules-of-hooks": "error",
@@ -41,7 +46,10 @@ export const recommendedOxlintConfig = {
41
46
  },
42
47
  { blankLine: "always", prev: "*", next: "return" },
43
48
  ],
44
- "typescript/consistent-type-imports": "error",
49
+ "typescript/consistent-type-imports": [
50
+ "error",
51
+ { fixStyle: "inline-type-imports", prefer: "type-imports" },
52
+ ],
45
53
  "typescript/no-floating-promises": "off",
46
54
  "typescript/no-explicit-any": "error",
47
55
  "typescript/no-misused-spread": "off",