@imranbarbhuiya/oxc-config 0.0.1 → 0.1.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 (69) hide show
  1. package/README.md +119 -156
  2. package/dist/api-error.d.ts +7 -2
  3. package/dist/api-error.js +6 -5
  4. package/dist/api-error.js.map +1 -1
  5. package/dist/central-icons.d.ts +7 -2
  6. package/dist/central-icons.js +6 -5
  7. package/dist/central-icons.js.map +1 -1
  8. package/dist/cli/index.d.ts +1 -0
  9. package/dist/cli/index.js +523 -0
  10. package/dist/cli/index.js.map +1 -0
  11. package/dist/common.d.ts +8 -2
  12. package/dist/common.js +36 -52
  13. package/dist/common.js.map +1 -1
  14. package/dist/config.d.ts +8 -0
  15. package/dist/config.js +31 -0
  16. package/dist/config.js.map +1 -0
  17. package/dist/edge.d.ts +5 -2
  18. package/dist/edge.js +14 -10
  19. package/dist/edge.js.map +1 -1
  20. package/dist/i18n.d.ts +8 -2
  21. package/dist/i18n.js +6 -5
  22. package/dist/i18n.js.map +1 -1
  23. package/dist/jsdoc.d.ts +5 -2
  24. package/dist/jsdoc.js +18 -17
  25. package/dist/jsdoc.js.map +1 -1
  26. package/dist/jsx.d.ts +5 -2
  27. package/dist/jsx.js +24 -26
  28. package/dist/jsx.js.map +1 -1
  29. package/dist/module.d.ts +4 -2
  30. package/dist/module.js +6 -3
  31. package/dist/module.js.map +1 -1
  32. package/dist/native-tailwind.d.ts +7 -2
  33. package/dist/native-tailwind.js +6 -5
  34. package/dist/native-tailwind.js.map +1 -1
  35. package/dist/native.d.ts +51 -2
  36. package/dist/native.js +37 -43
  37. package/dist/native.js.map +1 -1
  38. package/dist/nest-plugin.d.ts +2 -0
  39. package/dist/nest-plugin.js +3 -0
  40. package/dist/nest.d.ts +5 -2
  41. package/dist/nest.js +7 -7
  42. package/dist/nest.js.map +1 -1
  43. package/dist/next.d.ts +4 -2
  44. package/dist/next.js +25 -25
  45. package/dist/next.js.map +1 -1
  46. package/dist/node.d.ts +8 -2
  47. package/dist/node.js +67 -74
  48. package/dist/node.js.map +1 -1
  49. package/dist/oxfmt.d.ts +13 -0
  50. package/dist/oxfmt.js +16 -0
  51. package/dist/oxfmt.js.map +1 -0
  52. package/dist/plugins/api-error.js +14 -14
  53. package/dist/plugins/api-error.js.map +1 -1
  54. package/dist/react.d.ts +14 -2
  55. package/dist/react.js +56 -58
  56. package/dist/react.js.map +1 -1
  57. package/dist/tailwind.d.ts +15 -2
  58. package/dist/tailwind.js +10 -9
  59. package/dist/tailwind.js.map +1 -1
  60. package/dist/tsdoc.d.ts +15 -2
  61. package/dist/tsdoc.js +14 -14
  62. package/dist/tsdoc.js.map +1 -1
  63. package/dist/typescript.d.ts +5 -2
  64. package/dist/typescript.js +155 -192
  65. package/dist/typescript.js.map +1 -1
  66. package/package.json +162 -178
  67. package/dist/mdx.d.ts +0 -6
  68. package/dist/mdx.js +0 -25
  69. package/dist/mdx.js.map +0 -1
@@ -0,0 +1,523 @@
1
+ #!/usr/bin/env node
2
+ import fs from "node:fs/promises";
3
+ import path from "node:path";
4
+ import process from "node:process";
5
+ import { parseArgs } from "node:util";
6
+ import * as p from "@clack/prompts";
7
+ import { addDevDependency, detectPackageManager } from "nypm";
8
+
9
+ //#region src/cli/index.ts
10
+ const PACKAGE_NAME = "@imranbarbhuiya/oxc-config";
11
+ const PRESETS = {
12
+ nextjs: {
13
+ configs: [
14
+ "common",
15
+ "node",
16
+ "typescript",
17
+ "module",
18
+ "react",
19
+ "next",
20
+ "edge"
21
+ ],
22
+ description: "Next.js application with React, TypeScript, and edge runtime support"
23
+ },
24
+ react: {
25
+ configs: [
26
+ "common",
27
+ "node",
28
+ "typescript",
29
+ "module",
30
+ "react"
31
+ ],
32
+ description: "React application with TypeScript"
33
+ },
34
+ node: {
35
+ configs: [
36
+ "common",
37
+ "node",
38
+ "typescript",
39
+ "module"
40
+ ],
41
+ description: "Node.js application with TypeScript"
42
+ },
43
+ native: {
44
+ configs: [
45
+ "common",
46
+ "node",
47
+ "typescript",
48
+ "module",
49
+ "react",
50
+ "native"
51
+ ],
52
+ description: "React Native application with TypeScript"
53
+ },
54
+ library: {
55
+ configs: [
56
+ "common",
57
+ "node",
58
+ "typescript",
59
+ "module",
60
+ "tsdoc"
61
+ ],
62
+ description: "TypeScript library with TSDoc support"
63
+ },
64
+ nest: {
65
+ configs: [
66
+ "common",
67
+ "node",
68
+ "typescript",
69
+ "module",
70
+ "nest"
71
+ ],
72
+ description: "NestJS application with TypeScript"
73
+ }
74
+ };
75
+ const DEFAULT_IGNORES = {
76
+ nextjs: [
77
+ ".github/**",
78
+ ".yarn/**",
79
+ ".next/**",
80
+ "node_modules/**",
81
+ "next-env.d.ts"
82
+ ],
83
+ react: [
84
+ ".github/**",
85
+ ".yarn/**",
86
+ "node_modules/**",
87
+ "dist/**",
88
+ "build/**"
89
+ ],
90
+ node: [
91
+ ".github/**",
92
+ ".yarn/**",
93
+ "node_modules/**",
94
+ "dist/**"
95
+ ],
96
+ native: [
97
+ ".github/**",
98
+ ".yarn/**",
99
+ "node_modules/**",
100
+ ".expo/**",
101
+ "android/**",
102
+ "ios/**"
103
+ ],
104
+ library: [
105
+ ".github/**",
106
+ ".yarn/**",
107
+ "node_modules/**",
108
+ "dist/**"
109
+ ],
110
+ nest: [
111
+ ".github/**",
112
+ ".yarn/**",
113
+ "node_modules/**",
114
+ "dist/**"
115
+ ]
116
+ };
117
+ const PACKAGE_PRESET_MAP = {
118
+ next: "nextjs",
119
+ "react-native": "native",
120
+ react: "react",
121
+ "@nestjs/core": "nest"
122
+ };
123
+ const DETECTION_PRIORITY = [
124
+ "next",
125
+ "react-native",
126
+ "react",
127
+ "@nestjs/core"
128
+ ];
129
+ const { values: options } = parseArgs({
130
+ options: {
131
+ preset: {
132
+ type: "string",
133
+ short: "p"
134
+ },
135
+ tailwind: {
136
+ type: "boolean",
137
+ short: "t",
138
+ default: false
139
+ },
140
+ "no-tailwind": {
141
+ type: "boolean",
142
+ default: false
143
+ },
144
+ i18n: {
145
+ type: "boolean",
146
+ default: false
147
+ },
148
+ "no-i18n": {
149
+ type: "boolean",
150
+ default: false
151
+ },
152
+ "native-tailwind": {
153
+ type: "boolean",
154
+ default: false
155
+ },
156
+ "no-native-tailwind": {
157
+ type: "boolean",
158
+ default: false
159
+ },
160
+ "central-icons": {
161
+ type: "boolean",
162
+ default: false
163
+ },
164
+ "no-central-icons": {
165
+ type: "boolean",
166
+ default: false
167
+ },
168
+ "api-error": {
169
+ type: "boolean",
170
+ default: false
171
+ },
172
+ "no-api-error": {
173
+ type: "boolean",
174
+ default: false
175
+ },
176
+ query: {
177
+ type: "boolean",
178
+ default: false
179
+ },
180
+ "no-query": {
181
+ type: "boolean",
182
+ default: false
183
+ },
184
+ yes: {
185
+ type: "boolean",
186
+ short: "y",
187
+ default: false
188
+ },
189
+ cwd: { type: "string" },
190
+ help: {
191
+ type: "boolean",
192
+ short: "h",
193
+ default: false
194
+ }
195
+ },
196
+ strict: true,
197
+ allowPositionals: false
198
+ });
199
+ function printHelp() {
200
+ console.log(`
201
+ @imranbarbhuiya/oxc-config - Setup Oxlint and Oxfmt
202
+
203
+ Usage:
204
+ npx @imranbarbhuiya/oxc-config [options]
205
+
206
+ Options:
207
+ -p, --preset <name> Preset to use (nextjs, react, node, native, library, nest)
208
+ -t, --tailwind Include Tailwind CSS support
209
+ --no-tailwind Exclude Tailwind CSS support
210
+ --i18n Include next-intl i18n rules (Next.js)
211
+ --no-i18n Exclude next-intl i18n rules
212
+ --native-tailwind Include React Native Tailwind className rules
213
+ --no-native-tailwind Exclude React Native Tailwind className rules
214
+ --central-icons Include central-icons barrel-import rules
215
+ --no-central-icons Exclude central-icons barrel-import rules
216
+ --api-error Include ApiError rules for queryFn/mutationFn
217
+ --no-api-error Exclude ApiError rules
218
+ --query Include TanStack Query rules
219
+ --no-query Exclude TanStack Query rules
220
+ -y, --yes Skip prompts and use defaults
221
+ --cwd <path> Working directory (defaults to current directory)
222
+ -h, --help Show this help message
223
+
224
+ Examples:
225
+ npx @imranbarbhuiya/oxc-config
226
+ npx @imranbarbhuiya/oxc-config --preset nextjs --tailwind
227
+ npx @imranbarbhuiya/oxc-config -p react -y
228
+ `);
229
+ }
230
+ function generateOxlintConfig(preset, includeTailwind, extras) {
231
+ const configs = [...PRESETS[preset].configs];
232
+ if (includeTailwind) configs.push("tailwind");
233
+ if (extras.i18n) configs.push("i18n");
234
+ if (extras.nativeTailwind) configs.push("nativeTailwind");
235
+ if (extras.centralIcons) configs.push("centralIcons");
236
+ if (extras.apiError) configs.push("apiError");
237
+ const imports = configs.map((name) => {
238
+ return `import ${name} from '${PACKAGE_NAME}/${name === "nativeTailwind" ? "native-tailwind" : name}';`;
239
+ });
240
+ const ignores = DEFAULT_IGNORES[preset].map((ignore) => `'${ignore}'`).join(", ");
241
+ const queryBlock = extras.query ? `
242
+ jsPlugins: [{ name: 'query', specifier: '@tanstack/eslint-plugin-query' }],
243
+ rules: {
244
+ 'query/exhaustive-deps': 'error',
245
+ 'query/no-rest-destructuring': 'error',
246
+ 'query/stable-query-client': 'error',
247
+ },` : "";
248
+ const env = preset === "nextjs" || preset === "react" || preset === "native" ? `{
249
+ node: true,
250
+ browser: true,
251
+ serviceworker: true,
252
+ }` : `{
253
+ node: true,
254
+ }`;
255
+ return `import { defineConfig } from 'oxlint';
256
+
257
+ ${imports.join("\n")}
258
+
259
+ export default defineConfig({
260
+ extends: [${configs.join(", ")}],
261
+ ignorePatterns: [${ignores}],
262
+ env: ${env},
263
+ categories: {
264
+ correctness: 'off',
265
+ },
266
+ options: {
267
+ typeAware: true,
268
+ },${queryBlock}
269
+ });
270
+ `;
271
+ }
272
+ function generateOxfmtConfig() {
273
+ return `import { defineConfig } from 'oxfmt';
274
+
275
+ import config from '${PACKAGE_NAME}/oxfmt';
276
+
277
+ export default defineConfig({
278
+ ...config,
279
+ });
280
+ `;
281
+ }
282
+ async function fileExists(filePath) {
283
+ try {
284
+ await fs.access(filePath);
285
+ return true;
286
+ } catch {
287
+ return false;
288
+ }
289
+ }
290
+ async function getDependencies(cwd) {
291
+ const packageJsonPath = path.join(cwd, "package.json");
292
+ if (!await fileExists(packageJsonPath)) return {};
293
+ const content = await fs.readFile(packageJsonPath, "utf8");
294
+ const packageJson = JSON.parse(content);
295
+ return {
296
+ ...packageJson.dependencies,
297
+ ...packageJson.devDependencies
298
+ };
299
+ }
300
+ function detectPresetFromDependencies(dependencies) {
301
+ for (const name of DETECTION_PRIORITY) if (dependencies[name]) return PACKAGE_PRESET_MAP[name];
302
+ }
303
+ function hasNextIntl(dependencies) {
304
+ return Boolean(dependencies["next-intl"]);
305
+ }
306
+ function hasCentralIcons(dependencies) {
307
+ return Object.keys(dependencies).some((name) => name.startsWith("@central-icons-react/") || name.startsWith("@central-icons-react-native/"));
308
+ }
309
+ function hasTanstackQuery(dependencies) {
310
+ return Boolean(dependencies["@tanstack/react-query"]);
311
+ }
312
+ function hasTailwind(dependencies) {
313
+ return Boolean(dependencies.tailwindcss || dependencies.nativewind);
314
+ }
315
+ async function updateScripts(packageJsonPath) {
316
+ if (!await fileExists(packageJsonPath)) {
317
+ p.log.error("No package.json found. Run this command in a project with package.json.");
318
+ process.exit(1);
319
+ }
320
+ const content = await fs.readFile(packageJsonPath, "utf8");
321
+ const packageJson = JSON.parse(content);
322
+ const scripts = packageJson.scripts ?? {};
323
+ scripts.lint = "oxlint --fix .";
324
+ scripts["lint:check"] = "oxlint .";
325
+ scripts.format = "oxfmt";
326
+ scripts["format:check"] = "oxfmt --check";
327
+ packageJson.scripts = scripts;
328
+ await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, " ") + "\n");
329
+ }
330
+ async function installDependencies(cwd, includeTailwind, includeQuery) {
331
+ const pmName = (await detectPackageManager(cwd))?.name ?? "npm";
332
+ const dependencies = [
333
+ PACKAGE_NAME,
334
+ "oxlint",
335
+ "oxlint-tsgolint",
336
+ "oxfmt"
337
+ ];
338
+ if (includeTailwind) dependencies.push("eslint-plugin-better-tailwindcss");
339
+ if (includeQuery) dependencies.push("@tanstack/eslint-plugin-query");
340
+ p.log.info(`Detected package manager: ${pmName}`);
341
+ const spinner = p.spinner();
342
+ spinner.start("Installing dependencies");
343
+ for (const dependency of dependencies) {
344
+ spinner.message(`Installing ${dependency}`);
345
+ await addDevDependency(dependency, {
346
+ cwd,
347
+ silent: true
348
+ });
349
+ }
350
+ spinner.stop("Dependencies installed");
351
+ return pmName;
352
+ }
353
+ async function confirmOverwrite(filePath, skipPrompts) {
354
+ if (!await fileExists(filePath) || skipPrompts) return;
355
+ const result = await p.confirm({
356
+ message: `${path.basename(filePath)} already exists. Overwrite?`,
357
+ initialValue: false
358
+ });
359
+ if (p.isCancel(result)) {
360
+ p.cancel("Operation cancelled.");
361
+ process.exit(0);
362
+ }
363
+ if (!result) {
364
+ p.cancel("Aborted.");
365
+ process.exit(0);
366
+ }
367
+ }
368
+ if (options.help) {
369
+ printHelp();
370
+ process.exit(0);
371
+ }
372
+ p.intro("@imranbarbhuiya/oxc-config setup");
373
+ const cwd = options.cwd ? path.resolve(options.cwd) : process.cwd();
374
+ const skipPrompts = options.yes;
375
+ const dependencies = await getDependencies(cwd);
376
+ let preset = options.preset;
377
+ let includeTailwind = options["no-tailwind"] ? false : options.tailwind ? true : void 0;
378
+ let includeI18n = options["no-i18n"] ? false : options.i18n ? true : void 0;
379
+ let includeNativeTailwind = options["no-native-tailwind"] ? false : options["native-tailwind"] ? true : void 0;
380
+ let includeCentralIcons = options["no-central-icons"] ? false : options["central-icons"] ? true : void 0;
381
+ let includeApiError = options["no-api-error"] ? false : options["api-error"] ? true : void 0;
382
+ let includeQuery = options["no-query"] ? false : options.query ? true : void 0;
383
+ if (!preset) {
384
+ const detectedPreset = detectPresetFromDependencies(dependencies);
385
+ if (skipPrompts) preset = detectedPreset ?? "node";
386
+ else {
387
+ const presetOptions = Object.entries(PRESETS).map(([value, config]) => ({
388
+ value,
389
+ label: value,
390
+ hint: config.description
391
+ }));
392
+ if (detectedPreset) {
393
+ const detected = presetOptions.find((option) => option.value === detectedPreset);
394
+ if (detected) {
395
+ detected.hint = `Detected: ${detected.hint}`;
396
+ presetOptions.splice(0, presetOptions.length, detected, ...presetOptions.filter(({ value }) => value !== detectedPreset));
397
+ }
398
+ }
399
+ const selected = await p.select({
400
+ message: "Select a preset",
401
+ options: presetOptions
402
+ });
403
+ if (p.isCancel(selected)) {
404
+ p.cancel("Operation cancelled.");
405
+ process.exit(0);
406
+ }
407
+ preset = selected;
408
+ }
409
+ }
410
+ if (!(preset in PRESETS)) {
411
+ p.log.error(`Unknown preset: ${preset}`);
412
+ p.log.info(`Available presets: ${Object.keys(PRESETS).join(", ")}`);
413
+ process.exit(1);
414
+ }
415
+ if (includeTailwind === void 0) if (preset === "node" || preset === "library" || preset === "nest") includeTailwind = false;
416
+ else if (skipPrompts) includeTailwind = hasTailwind(dependencies);
417
+ else {
418
+ const result = await p.confirm({
419
+ message: "Include Tailwind CSS support?",
420
+ initialValue: hasTailwind(dependencies)
421
+ });
422
+ if (p.isCancel(result)) {
423
+ p.cancel("Operation cancelled.");
424
+ process.exit(0);
425
+ }
426
+ includeTailwind = result;
427
+ }
428
+ if (includeI18n === void 0) if (preset !== "nextjs") includeI18n = false;
429
+ else if (skipPrompts) includeI18n = hasNextIntl(dependencies);
430
+ else {
431
+ const result = await p.confirm({
432
+ message: "Include next-intl i18n rules?",
433
+ initialValue: hasNextIntl(dependencies)
434
+ });
435
+ if (p.isCancel(result)) {
436
+ p.cancel("Operation cancelled.");
437
+ process.exit(0);
438
+ }
439
+ includeI18n = result;
440
+ }
441
+ if (includeNativeTailwind === void 0) if (preset !== "native" || !includeTailwind) includeNativeTailwind = false;
442
+ else if (skipPrompts) includeNativeTailwind = true;
443
+ else {
444
+ const result = await p.confirm({
445
+ message: "Include React Native Tailwind className rules?",
446
+ initialValue: true
447
+ });
448
+ if (p.isCancel(result)) {
449
+ p.cancel("Operation cancelled.");
450
+ process.exit(0);
451
+ }
452
+ includeNativeTailwind = result;
453
+ }
454
+ if (includeCentralIcons === void 0) if (preset !== "native" && preset !== "react" && preset !== "nextjs") includeCentralIcons = false;
455
+ else if (skipPrompts) includeCentralIcons = hasCentralIcons(dependencies);
456
+ else {
457
+ const result = await p.confirm({
458
+ message: "Include central-icons barrel-import rules?",
459
+ initialValue: hasCentralIcons(dependencies)
460
+ });
461
+ if (p.isCancel(result)) {
462
+ p.cancel("Operation cancelled.");
463
+ process.exit(0);
464
+ }
465
+ includeCentralIcons = result;
466
+ }
467
+ if (includeQuery === void 0) if (preset !== "native" && preset !== "react" && preset !== "nextjs") includeQuery = false;
468
+ else if (skipPrompts) includeQuery = hasTanstackQuery(dependencies);
469
+ else {
470
+ const result = await p.confirm({
471
+ message: "Include TanStack Query rules?",
472
+ initialValue: hasTanstackQuery(dependencies)
473
+ });
474
+ if (p.isCancel(result)) {
475
+ p.cancel("Operation cancelled.");
476
+ process.exit(0);
477
+ }
478
+ includeQuery = result;
479
+ }
480
+ if (includeApiError === void 0) if (preset !== "native" && preset !== "react" && preset !== "nextjs") includeApiError = false;
481
+ else if (skipPrompts) includeApiError = hasTanstackQuery(dependencies);
482
+ else {
483
+ const result = await p.confirm({
484
+ message: "Include ApiError rules for queryFn/mutationFn?",
485
+ initialValue: hasTanstackQuery(dependencies)
486
+ });
487
+ if (p.isCancel(result)) {
488
+ p.cancel("Operation cancelled.");
489
+ process.exit(0);
490
+ }
491
+ includeApiError = result;
492
+ }
493
+ p.log.step(`Setting up Oxlint and Oxfmt with preset: ${preset}`);
494
+ if (includeTailwind) p.log.info("Including Tailwind CSS support");
495
+ if (includeI18n) p.log.info("Including next-intl i18n rules");
496
+ if (includeNativeTailwind) p.log.info("Including React Native Tailwind className rules");
497
+ if (includeCentralIcons) p.log.info("Including central-icons barrel-import rules");
498
+ if (includeQuery) p.log.info("Including TanStack Query rules");
499
+ if (includeApiError) p.log.info("Including ApiError rules for queryFn/mutationFn");
500
+ const oxlintConfigPath = path.join(cwd, "oxlint.config.ts");
501
+ const oxfmtConfigPath = path.join(cwd, "oxfmt.config.ts");
502
+ const packageJsonPath = path.join(cwd, "package.json");
503
+ await confirmOverwrite(oxlintConfigPath, skipPrompts);
504
+ await confirmOverwrite(oxfmtConfigPath, skipPrompts);
505
+ await fs.writeFile(oxlintConfigPath, generateOxlintConfig(preset, includeTailwind, {
506
+ i18n: includeI18n,
507
+ nativeTailwind: includeNativeTailwind,
508
+ centralIcons: includeCentralIcons,
509
+ query: includeQuery,
510
+ apiError: includeApiError
511
+ }));
512
+ await fs.writeFile(oxfmtConfigPath, generateOxfmtConfig());
513
+ p.log.success("Created oxlint.config.ts and oxfmt.config.ts");
514
+ await updateScripts(packageJsonPath);
515
+ p.log.success("Updated package.json scripts");
516
+ const pmName = await installDependencies(cwd, includeTailwind, includeQuery);
517
+ const runPrefix = pmName === "npm" ? "npm run" : pmName;
518
+ p.outro(`Setup complete! Run \`${runPrefix} lint && ${runPrefix} format\``);
519
+ process.exit(0);
520
+
521
+ //#endregion
522
+ export { };
523
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/cli/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport fs from 'node:fs/promises';\nimport path from 'node:path';\nimport process from 'node:process';\nimport { parseArgs } from 'node:util';\n\nimport * as p from '@clack/prompts';\nimport { addDevDependency, detectPackageManager } from 'nypm';\n\ninterface PresetConfig {\n\tconfigs: string[];\n\tdescription: string;\n}\n\ninterface ExtraConfigs {\n\tapiError: boolean;\n\tcentralIcons: boolean;\n\ti18n: boolean;\n\tnativeTailwind: boolean;\n\tquery: boolean;\n}\n\nconst PACKAGE_NAME = '@imranbarbhuiya/oxc-config';\n\nconst PRESETS: Record<string, PresetConfig> = {\n\tnextjs: {\n\t\tconfigs: ['common', 'node', 'typescript', 'module', 'react', 'next', 'edge'],\n\t\tdescription: 'Next.js application with React, TypeScript, and edge runtime support',\n\t},\n\treact: {\n\t\tconfigs: ['common', 'node', 'typescript', 'module', 'react'],\n\t\tdescription: 'React application with TypeScript',\n\t},\n\tnode: {\n\t\tconfigs: ['common', 'node', 'typescript', 'module'],\n\t\tdescription: 'Node.js application with TypeScript',\n\t},\n\tnative: {\n\t\tconfigs: ['common', 'node', 'typescript', 'module', 'react', 'native'],\n\t\tdescription: 'React Native application with TypeScript',\n\t},\n\tlibrary: {\n\t\tconfigs: ['common', 'node', 'typescript', 'module', 'tsdoc'],\n\t\tdescription: 'TypeScript library with TSDoc support',\n\t},\n\tnest: {\n\t\tconfigs: ['common', 'node', 'typescript', 'module', 'nest'],\n\t\tdescription: 'NestJS application with TypeScript',\n\t},\n};\n\nconst DEFAULT_IGNORES: Record<string, string[]> = {\n\tnextjs: ['.github/**', '.yarn/**', '.next/**', 'node_modules/**', 'next-env.d.ts'],\n\treact: ['.github/**', '.yarn/**', 'node_modules/**', 'dist/**', 'build/**'],\n\tnode: ['.github/**', '.yarn/**', 'node_modules/**', 'dist/**'],\n\tnative: ['.github/**', '.yarn/**', 'node_modules/**', '.expo/**', 'android/**', 'ios/**'],\n\tlibrary: ['.github/**', '.yarn/**', 'node_modules/**', 'dist/**'],\n\tnest: ['.github/**', '.yarn/**', 'node_modules/**', 'dist/**'],\n};\n\nconst PACKAGE_PRESET_MAP: Record<string, string> = {\n\tnext: 'nextjs',\n\t'react-native': 'native',\n\treact: 'react',\n\t'@nestjs/core': 'nest',\n};\n\nconst DETECTION_PRIORITY = ['next', 'react-native', 'react', '@nestjs/core'];\n\nconst { values: options } = parseArgs({\n\toptions: {\n\t\tpreset: { type: 'string', short: 'p' },\n\t\ttailwind: { type: 'boolean', short: 't', default: false },\n\t\t'no-tailwind': { type: 'boolean', default: false },\n\t\ti18n: { type: 'boolean', default: false },\n\t\t'no-i18n': { type: 'boolean', default: false },\n\t\t'native-tailwind': { type: 'boolean', default: false },\n\t\t'no-native-tailwind': { type: 'boolean', default: false },\n\t\t'central-icons': { type: 'boolean', default: false },\n\t\t'no-central-icons': { type: 'boolean', default: false },\n\t\t'api-error': { type: 'boolean', default: false },\n\t\t'no-api-error': { type: 'boolean', default: false },\n\t\tquery: { type: 'boolean', default: false },\n\t\t'no-query': { type: 'boolean', default: false },\n\t\tyes: { type: 'boolean', short: 'y', default: false },\n\t\tcwd: { type: 'string' },\n\t\thelp: { type: 'boolean', short: 'h', default: false },\n\t},\n\tstrict: true,\n\tallowPositionals: false,\n});\n\nfunction printHelp(): void {\n\tconsole.log(`\n@imranbarbhuiya/oxc-config - Setup Oxlint and Oxfmt\n\nUsage:\n npx @imranbarbhuiya/oxc-config [options]\n\nOptions:\n -p, --preset <name> Preset to use (nextjs, react, node, native, library, nest)\n -t, --tailwind Include Tailwind CSS support\n --no-tailwind Exclude Tailwind CSS support\n --i18n Include next-intl i18n rules (Next.js)\n --no-i18n Exclude next-intl i18n rules\n --native-tailwind Include React Native Tailwind className rules\n --no-native-tailwind Exclude React Native Tailwind className rules\n --central-icons Include central-icons barrel-import rules\n --no-central-icons Exclude central-icons barrel-import rules\n --api-error Include ApiError rules for queryFn/mutationFn\n --no-api-error Exclude ApiError rules\n --query Include TanStack Query rules\n --no-query Exclude TanStack Query rules\n -y, --yes Skip prompts and use defaults\n --cwd <path> Working directory (defaults to current directory)\n -h, --help Show this help message\n\nExamples:\n npx @imranbarbhuiya/oxc-config\n npx @imranbarbhuiya/oxc-config --preset nextjs --tailwind\n npx @imranbarbhuiya/oxc-config -p react -y\n`);\n}\n\nfunction generateOxlintConfig(preset: string, includeTailwind: boolean, extras: ExtraConfigs): string {\n\tconst configs = [...PRESETS[preset].configs];\n\n\tif (includeTailwind) configs.push('tailwind');\n\tif (extras.i18n) configs.push('i18n');\n\tif (extras.nativeTailwind) configs.push('nativeTailwind');\n\tif (extras.centralIcons) configs.push('centralIcons');\n\tif (extras.apiError) configs.push('apiError');\n\n\tconst imports = configs.map((name) => {\n\t\tconst fragment = name === 'nativeTailwind' ? 'native-tailwind' : name;\n\t\treturn `import ${name} from '${PACKAGE_NAME}/${fragment}';`;\n\t});\n\n\tconst ignores = DEFAULT_IGNORES[preset].map((ignore) => `'${ignore}'`).join(', ');\n\tconst queryBlock = extras.query\n\t\t? `\n\tjsPlugins: [{ name: 'query', specifier: '@tanstack/eslint-plugin-query' }],\n\trules: {\n\t\t'query/exhaustive-deps': 'error',\n\t\t'query/no-rest-destructuring': 'error',\n\t\t'query/stable-query-client': 'error',\n\t},`\n\t\t: '';\n\n\tconst env =\n\t\tpreset === 'nextjs' || preset === 'react' || preset === 'native'\n\t\t\t? `{\n\t\tnode: true,\n\t\tbrowser: true,\n\t\tserviceworker: true,\n\t}`\n\t\t\t: `{\n\t\tnode: true,\n\t}`;\n\n\treturn `import { defineConfig } from 'oxlint';\n\n${imports.join('\\n')}\n\nexport default defineConfig({\n\textends: [${configs.join(', ')}],\n\tignorePatterns: [${ignores}],\n\tenv: ${env},\n\tcategories: {\n\t\tcorrectness: 'off',\n\t},\n\toptions: {\n\t\ttypeAware: true,\n\t},${queryBlock}\n});\n`;\n}\n\nfunction generateOxfmtConfig(): string {\n\treturn `import { defineConfig } from 'oxfmt';\n\nimport config from '${PACKAGE_NAME}/oxfmt';\n\nexport default defineConfig({\n\t...config,\n});\n`;\n}\n\nasync function fileExists(filePath: string): Promise<boolean> {\n\ttry {\n\t\tawait fs.access(filePath);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nasync function getDependencies(cwd: string): Promise<Record<string, string>> {\n\tconst packageJsonPath = path.join(cwd, 'package.json');\n\tif (!(await fileExists(packageJsonPath))) return {};\n\n\tconst content = await fs.readFile(packageJsonPath, 'utf8');\n\tconst packageJson = JSON.parse(content) as Record<string, unknown>;\n\n\treturn {\n\t\t...(packageJson.dependencies as Record<string, string> | undefined),\n\t\t...(packageJson.devDependencies as Record<string, string> | undefined),\n\t};\n}\n\nfunction detectPresetFromDependencies(dependencies: Record<string, string>): string | undefined {\n\tfor (const name of DETECTION_PRIORITY) if (dependencies[name]) return PACKAGE_PRESET_MAP[name];\n\treturn undefined;\n}\n\nfunction hasNextIntl(dependencies: Record<string, string>): boolean {\n\treturn Boolean(dependencies['next-intl']);\n}\n\nfunction hasCentralIcons(dependencies: Record<string, string>): boolean {\n\treturn Object.keys(dependencies).some(\n\t\t(name) => name.startsWith('@central-icons-react/') || name.startsWith('@central-icons-react-native/'),\n\t);\n}\n\nfunction hasTanstackQuery(dependencies: Record<string, string>): boolean {\n\treturn Boolean(dependencies['@tanstack/react-query']);\n}\n\nfunction hasTailwind(dependencies: Record<string, string>): boolean {\n\treturn Boolean(dependencies.tailwindcss || dependencies.nativewind);\n}\n\nasync function updateScripts(packageJsonPath: string): Promise<void> {\n\tif (!(await fileExists(packageJsonPath))) {\n\t\tp.log.error('No package.json found. Run this command in a project with package.json.');\n\t\tprocess.exit(1);\n\t}\n\n\tconst content = await fs.readFile(packageJsonPath, 'utf8');\n\tconst packageJson = JSON.parse(content) as Record<string, unknown>;\n\tconst scripts = (packageJson.scripts as Record<string, string> | undefined) ?? {};\n\n\tscripts.lint = 'oxlint --fix .';\n\tscripts['lint:check'] = 'oxlint .';\n\tscripts.format = 'oxfmt';\n\tscripts['format:check'] = 'oxfmt --check';\n\tpackageJson.scripts = scripts;\n\n\tawait fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, '\\t') + '\\n');\n}\n\nasync function installDependencies(cwd: string, includeTailwind: boolean, includeQuery: boolean): Promise<string> {\n\tconst pm = await detectPackageManager(cwd);\n\tconst pmName = pm?.name ?? 'npm';\n\tconst dependencies = [PACKAGE_NAME, 'oxlint', 'oxlint-tsgolint', 'oxfmt'];\n\n\tif (includeTailwind) dependencies.push('eslint-plugin-better-tailwindcss');\n\tif (includeQuery) dependencies.push('@tanstack/eslint-plugin-query');\n\n\tp.log.info(`Detected package manager: ${pmName}`);\n\tconst spinner = p.spinner();\n\tspinner.start('Installing dependencies');\n\n\tfor (const dependency of dependencies) {\n\t\tspinner.message(`Installing ${dependency}`);\n\t\tawait addDevDependency(dependency, { cwd, silent: true });\n\t}\n\n\tspinner.stop('Dependencies installed');\n\treturn pmName;\n}\n\nasync function confirmOverwrite(filePath: string, skipPrompts: boolean): Promise<void> {\n\tif (!(await fileExists(filePath)) || skipPrompts) return;\n\n\tconst result = await p.confirm({\n\t\tmessage: `${path.basename(filePath)} already exists. Overwrite?`,\n\t\tinitialValue: false,\n\t});\n\n\tif (p.isCancel(result)) {\n\t\tp.cancel('Operation cancelled.');\n\t\tprocess.exit(0);\n\t}\n\n\tif (!result) {\n\t\tp.cancel('Aborted.');\n\t\tprocess.exit(0);\n\t}\n}\n\nif (options.help) {\n\tprintHelp();\n\tprocess.exit(0);\n}\n\np.intro('@imranbarbhuiya/oxc-config setup');\n\nconst cwd = options.cwd ? path.resolve(options.cwd) : process.cwd();\nconst skipPrompts = options.yes;\nconst dependencies = await getDependencies(cwd);\n\nlet preset = options.preset;\nlet includeTailwind = options['no-tailwind'] ? false : options.tailwind ? true : undefined;\nlet includeI18n = options['no-i18n'] ? false : options.i18n ? true : undefined;\nlet includeNativeTailwind = options['no-native-tailwind'] ? false : options['native-tailwind'] ? true : undefined;\nlet includeCentralIcons = options['no-central-icons'] ? false : options['central-icons'] ? true : undefined;\nlet includeApiError = options['no-api-error'] ? false : options['api-error'] ? true : undefined;\nlet includeQuery = options['no-query'] ? false : options.query ? true : undefined;\n\nif (!preset) {\n\tconst detectedPreset = detectPresetFromDependencies(dependencies);\n\tif (skipPrompts) preset = detectedPreset ?? 'node';\n\telse {\n\t\tconst presetOptions = Object.entries(PRESETS).map(([value, config]) => ({\n\t\t\tvalue,\n\t\t\tlabel: value,\n\t\t\thint: config.description,\n\t\t}));\n\n\t\tif (detectedPreset) {\n\t\t\tconst detected = presetOptions.find((option) => option.value === detectedPreset);\n\t\t\tif (detected) {\n\t\t\t\tdetected.hint = `Detected: ${detected.hint}`;\n\t\t\t\tpresetOptions.splice(\n\t\t\t\t\t0,\n\t\t\t\t\tpresetOptions.length,\n\t\t\t\t\tdetected,\n\t\t\t\t\t...presetOptions.filter(({ value }) => value !== detectedPreset),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst selected = await p.select({\n\t\t\tmessage: 'Select a preset',\n\t\t\toptions: presetOptions,\n\t\t});\n\n\t\tif (p.isCancel(selected)) {\n\t\t\tp.cancel('Operation cancelled.');\n\t\t\tprocess.exit(0);\n\t\t}\n\n\t\tpreset = selected;\n\t}\n}\n\nif (!(preset in PRESETS)) {\n\tp.log.error(`Unknown preset: ${preset}`);\n\tp.log.info(`Available presets: ${Object.keys(PRESETS).join(', ')}`);\n\tprocess.exit(1);\n}\n\nif (includeTailwind === undefined) {\n\tif (preset === 'node' || preset === 'library' || preset === 'nest') includeTailwind = false;\n\telse if (skipPrompts) includeTailwind = hasTailwind(dependencies);\n\telse {\n\t\tconst result = await p.confirm({\n\t\t\tmessage: 'Include Tailwind CSS support?',\n\t\t\tinitialValue: hasTailwind(dependencies),\n\t\t});\n\t\tif (p.isCancel(result)) {\n\t\t\tp.cancel('Operation cancelled.');\n\t\t\tprocess.exit(0);\n\t\t}\n\t\tincludeTailwind = result;\n\t}\n}\n\nif (includeI18n === undefined) {\n\tif (preset !== 'nextjs') includeI18n = false;\n\telse if (skipPrompts) includeI18n = hasNextIntl(dependencies);\n\telse {\n\t\tconst result = await p.confirm({\n\t\t\tmessage: 'Include next-intl i18n rules?',\n\t\t\tinitialValue: hasNextIntl(dependencies),\n\t\t});\n\t\tif (p.isCancel(result)) {\n\t\t\tp.cancel('Operation cancelled.');\n\t\t\tprocess.exit(0);\n\t\t}\n\t\tincludeI18n = result;\n\t}\n}\n\nif (includeNativeTailwind === undefined) {\n\tif (preset !== 'native' || !includeTailwind) includeNativeTailwind = false;\n\telse if (skipPrompts) includeNativeTailwind = true;\n\telse {\n\t\tconst result = await p.confirm({\n\t\t\tmessage: 'Include React Native Tailwind className rules?',\n\t\t\tinitialValue: true,\n\t\t});\n\t\tif (p.isCancel(result)) {\n\t\t\tp.cancel('Operation cancelled.');\n\t\t\tprocess.exit(0);\n\t\t}\n\t\tincludeNativeTailwind = result;\n\t}\n}\n\nif (includeCentralIcons === undefined) {\n\tif (preset !== 'native' && preset !== 'react' && preset !== 'nextjs') includeCentralIcons = false;\n\telse if (skipPrompts) includeCentralIcons = hasCentralIcons(dependencies);\n\telse {\n\t\tconst result = await p.confirm({\n\t\t\tmessage: 'Include central-icons barrel-import rules?',\n\t\t\tinitialValue: hasCentralIcons(dependencies),\n\t\t});\n\t\tif (p.isCancel(result)) {\n\t\t\tp.cancel('Operation cancelled.');\n\t\t\tprocess.exit(0);\n\t\t}\n\t\tincludeCentralIcons = result;\n\t}\n}\n\nif (includeQuery === undefined) {\n\tif (preset !== 'native' && preset !== 'react' && preset !== 'nextjs') includeQuery = false;\n\telse if (skipPrompts) includeQuery = hasTanstackQuery(dependencies);\n\telse {\n\t\tconst result = await p.confirm({\n\t\t\tmessage: 'Include TanStack Query rules?',\n\t\t\tinitialValue: hasTanstackQuery(dependencies),\n\t\t});\n\t\tif (p.isCancel(result)) {\n\t\t\tp.cancel('Operation cancelled.');\n\t\t\tprocess.exit(0);\n\t\t}\n\t\tincludeQuery = result;\n\t}\n}\n\nif (includeApiError === undefined) {\n\tif (preset !== 'native' && preset !== 'react' && preset !== 'nextjs') includeApiError = false;\n\telse if (skipPrompts) includeApiError = hasTanstackQuery(dependencies);\n\telse {\n\t\tconst result = await p.confirm({\n\t\t\tmessage: 'Include ApiError rules for queryFn/mutationFn?',\n\t\t\tinitialValue: hasTanstackQuery(dependencies),\n\t\t});\n\t\tif (p.isCancel(result)) {\n\t\t\tp.cancel('Operation cancelled.');\n\t\t\tprocess.exit(0);\n\t\t}\n\t\tincludeApiError = result;\n\t}\n}\n\np.log.step(`Setting up Oxlint and Oxfmt with preset: ${preset}`);\nif (includeTailwind) p.log.info('Including Tailwind CSS support');\nif (includeI18n) p.log.info('Including next-intl i18n rules');\nif (includeNativeTailwind) p.log.info('Including React Native Tailwind className rules');\nif (includeCentralIcons) p.log.info('Including central-icons barrel-import rules');\nif (includeQuery) p.log.info('Including TanStack Query rules');\nif (includeApiError) p.log.info('Including ApiError rules for queryFn/mutationFn');\n\nconst oxlintConfigPath = path.join(cwd, 'oxlint.config.ts');\nconst oxfmtConfigPath = path.join(cwd, 'oxfmt.config.ts');\nconst packageJsonPath = path.join(cwd, 'package.json');\n\nawait confirmOverwrite(oxlintConfigPath, skipPrompts);\nawait confirmOverwrite(oxfmtConfigPath, skipPrompts);\nawait fs.writeFile(\n\toxlintConfigPath,\n\tgenerateOxlintConfig(preset, includeTailwind, {\n\t\ti18n: includeI18n,\n\t\tnativeTailwind: includeNativeTailwind,\n\t\tcentralIcons: includeCentralIcons,\n\t\tquery: includeQuery,\n\t\tapiError: includeApiError,\n\t}),\n);\nawait fs.writeFile(oxfmtConfigPath, generateOxfmtConfig());\np.log.success('Created oxlint.config.ts and oxfmt.config.ts');\n\nawait updateScripts(packageJsonPath);\np.log.success('Updated package.json scripts');\n\nconst pmName = await installDependencies(cwd, includeTailwind, includeQuery);\nconst runPrefix = pmName === 'npm' ? 'npm run' : pmName;\np.outro(`Setup complete! Run \\`${runPrefix} lint && ${runPrefix} format\\``);\n\nprocess.exit(0);\n"],"mappings":";;;;;;;;;AAsBA,MAAM,eAAe;AAErB,MAAM,UAAwC;CAC7C,QAAQ;EACP,SAAS;GAAC;GAAU;GAAQ;GAAc;GAAU;GAAS;GAAQ;EAAM;EAC3E,aAAa;CACd;CACA,OAAO;EACN,SAAS;GAAC;GAAU;GAAQ;GAAc;GAAU;EAAO;EAC3D,aAAa;CACd;CACA,MAAM;EACL,SAAS;GAAC;GAAU;GAAQ;GAAc;EAAQ;EAClD,aAAa;CACd;CACA,QAAQ;EACP,SAAS;GAAC;GAAU;GAAQ;GAAc;GAAU;GAAS;EAAQ;EACrE,aAAa;CACd;CACA,SAAS;EACR,SAAS;GAAC;GAAU;GAAQ;GAAc;GAAU;EAAO;EAC3D,aAAa;CACd;CACA,MAAM;EACL,SAAS;GAAC;GAAU;GAAQ;GAAc;GAAU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.ts CHANGED
@@ -1,6 +1,12 @@
1
- import { TSESLint } from "@typescript-eslint/utils";
2
1
  //#region src/common.d.ts
3
- declare const config: TSESLint.FlatConfig.ConfigArray;
2
+ declare const config: {
3
+ plugins: ("eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue")[];
4
+ jsPlugins: import("oxlint").ExternalPluginEntry[];
5
+ options: {
6
+ reportUnusedDisableDirectives: "warn";
7
+ };
8
+ rules: import("oxlint").DummyRuleMap;
9
+ };
4
10
  //#endregion
5
11
  export { config as default };
6
12
  //# sourceMappingURL=common.d.ts.map