adamantite 0.32.0 → 0.32.1

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.
package/dist/index.js CHANGED
@@ -109,4 +109,4 @@ ${Zr[e]}
109
109
  `).pipe(X.mapError((u)=>new O({cause:u,path:n})))})});import*as ae from"effect/Effect";import*as Ot from"effect/FileSystem";import*as St from"effect/Path";var He=[{path:".zed/settings.json",type:"config"}],er={languages:{CSS:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}}]},HTML:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}}]},JSON:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}}]},JSONC:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}}]},JavaScript:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}},{code_action:"source.fixAll.oxc"}]},MDX:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}}]},Markdown:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}}]},TSX:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}},{code_action:"source.fixAll.oxc"}]},TypeScript:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}},{code_action:"source.fixAll.oxc"}]},YAML:{format_on_save:"on",formatter:[{language_server:{name:"oxfmt"}}]}},lsp:{oxfmt:{initialization_options:{settings:{configPath:null,"fmt.experimental":!0,run:"onSave",typeAware:!1,unusedDisableDirectives:!1}}},oxlint:{initialization_options:{settings:{configPath:null,fixKind:"safe_fix",run:"onType",typeAware:!0,unusedDisableDirectives:"deny"}}}}},fe=_({config:He[0].path,create:(e)=>ae.gen(function*(){let t=yield*Ot.FileSystem,r=yield*St.Path,n=r.join(e,He[0].path),o=r.dirname(n);yield*t.makeDirectory(o,{recursive:!0}).pipe(ae.mapError((i)=>new me({cause:i,path:o}))),yield*t.writeFileString(n,`${JSON.stringify(er,null,2)}
110
110
  `).pipe(ae.mapError((i)=>new O({cause:i,path:n})))}),exists:(e)=>ae.gen(function*(){let t=yield*Ot.FileSystem,r=yield*St.Path;return yield*t.exists(r.join(e,He[0].path))}),files:He,kind:"editor",name:"zed",update:(e)=>ae.gen(function*(){let t=yield*Ot.FileSystem,n=(yield*St.Path).join(e,He[0].path),o=yield*t.readFileString(n).pipe(ae.mapError((u)=>new D({cause:u,path:n}))),i=yield*w(o,n);if(!N(i))return yield*new x({path:n});let a=yield*Ee(er,i);yield*t.writeFileString(n,`${JSON.stringify(a,null,2)}
111
111
  `).pipe(ae.mapError((u)=>new O({cause:u,path:n})))})});import fo from"node:process";import*as tr from"effect/Effect";import*as nr from"effect/FileSystem";import*as rr from"effect/Path";var Bt=(e=fo.cwd())=>tr.gen(function*(){let t=yield*nr.FileSystem,r=yield*rr.Path;if(yield*t.exists(r.join(e,"pnpm-workspace.yaml")))return!0;return(yield*$(e)).workspaces!==void 0});var lo=(e,t)=>j.gen(function*(){let r=yield*Z,o=(yield*g).spinner();o.start("Installing dependencies...");let i=yield*Bt(e);yield*r.addDevDependencies(t,e,{silent:!0,workspace:i}).pipe(j.tapError(()=>j.sync(()=>{o.stop("Failed to install dependencies.")}))),o.stop("Dependencies installed.")});function Qt(e,t){return j.gen(function*(){yield*(yield*g).log.info(`Legacy \`${t}\` was preserved during \`adamantite init\`. \`adamantite init\` does not migrate legacy ${e} configs yet.`)})}var po=(e,t)=>j.gen(function*(){let r=yield*g,n=r.spinner();n.start("Setting up oxlint config...");let o=yield*c.exists(e),i=c.files[1].path;if(o.active?.format==="ts"&&o.legacy.length>0)yield*r.log.warning(`Found both \`${c.config}\` and \`${i}\`. Adamantite will use \`${c.config}\`.`);if(o.active?.format==="json")n.message(`Found \`${i}\`, keeping existing config.`),n.stop("oxlint config is ready."),yield*Qt("oxlint",i);else if(o.active?.format==="ts")n.message(`Found \`${c.config}\`, keeping existing config.`),n.stop("oxlint config is ready.");else n.message(`\`${c.config}\` not found, creating...`),yield*c.create(e,t),n.stop("oxlint config created successfully.")}),uo=(e)=>j.gen(function*(){let t=yield*g,r=t.spinner();r.start("Setting up oxfmt config...");let n=yield*d.exists(e);if(n.active?.format==="ts"&&n.legacy.length>0)yield*t.log.warning(`Found both \`${d.config}\` and \`.oxfmtrc.json(c)\`. Adamantite will use \`${d.config}\`.`);if(n.active&&n.active.format!=="ts"&&n.legacy.length>0)yield*t.log.warning("Found both `.oxfmtrc.json` and `.oxfmtrc.jsonc`. Multiple legacy oxfmt configs exist; Adamantite will treat `.oxfmtrc.jsonc` as the source of truth when migration is needed.");if(n.active?.format==="json"||n.active?.format==="jsonc"){let o=n.active.path.endsWith(d.files[1].path)?d.files[1].path:d.files[2].path;r.message(`Found \`${o}\`, keeping existing config.`),r.stop("oxfmt config is ready."),yield*Qt("oxfmt",o)}else if(n.active?.format==="ts")r.message(`Found \`${d.config}\`, keeping existing config.`),r.stop("oxfmt config is ready.");else r.message(`\`${d.config}\` not found, creating...`),yield*d.create(e),r.stop("oxfmt config created successfully.")}),co=(e,t)=>j.gen(function*(){let r=yield*or.FileSystem,n=yield*ir.Path,o=yield*g,i=yield*$(e),a=o.spinner();a.start("Adding scripts to your `package.json`..."),i.scripts??={};for(let y of t)switch(y){case"check":i.scripts.check="adamantite check";break;case"fix":i.scripts.fix="adamantite fix";break;case"format":i.scripts.format="adamantite format";break;case"check:monorepo":i.scripts["check:monorepo"]="adamantite monorepo";break;case"fix:monorepo":i.scripts["fix:monorepo"]="adamantite monorepo --fix";break;case"analyze":i.scripts.analyze="adamantite analyze";break;default:return yield*new Nt({script:y})}let u=n.join(e,"package.json");yield*r.writeFileString(u,`${JSON.stringify(i,null,2)}
112
- `).pipe(j.mapError((y)=>new O({cause:y,path:u}))),a.stop("Scripts added to your `package.json`")}),yo=(e)=>j.gen(function*(){let t=yield*g,r=t.spinner();r.start("Setting up knip config...");let n=yield*m.exists(e);if(n.active?.format==="ts"&&n.legacy.length>0)yield*t.log.warning(`Found both \`${m.config}\` and \`knip.json(c)\`. Adamantite will use \`${m.config}\`.`);if(n.active&&n.active.format!=="ts"&&n.legacy.length>0)yield*t.log.warning("Found both `knip.json` and `knip.jsonc`. Multiple legacy knip configs exist; Adamantite will treat `knip.jsonc` as the source of truth when migration is needed.");if(n.active?.format==="json"||n.active?.format==="jsonc"){let o=n.active.path.endsWith(m.files[1].path)?m.files[1].path:m.files[2].path;r.message(`Found \`${o}\`, keeping existing config.`),r.stop("knip config is ready."),yield*Qt("knip",o)}else if(n.active?.format==="ts")r.message(`Found \`${m.config}\`, keeping existing config.`),r.stop("knip config is ready.");else r.message(`\`${m.config}\` not found, creating...`),yield*m.create(e),r.stop("knip config created successfully.")}),mo=(e)=>j.gen(function*(){let r=(yield*g).spinner();if(r.start("Setting up TypeScript config..."),yield*V.exists(e))r.message(`\`${V.config}\` found, updating...`),yield*V.update(e),r.stop(`\`${V.config}\` updated successfully`);else r.message(`\`${V.config}\` not found, creating...`),yield*V.create(e),r.stop(`\`${V.config}\` created successfully`)}),ho=(e,t)=>j.gen(function*(){let r=yield*g;if(t.includes("vscode")){let n=r.spinner();if(n.start(`Checking for \`${ne.config}\`...`),yield*ne.exists(e))n.message(`\`${ne.config}\` found, updating...`),yield*ne.update(e),n.stop(`\`${ne.config}\` updated with Adamantite preset.`);else n.message(`\`${ne.config}\` not found, creating...`),yield*ne.create(e),n.stop(`\`${ne.config}\` created with Adamantite preset.`)}if(t.includes("zed")){let n=r.spinner();if(n.start(`Checking for \`${fe.config}\`...`),yield*fe.exists(e))n.message(`\`${fe.config}\` found, updating...`),yield*fe.update(e),n.stop(`\`${fe.config}\` updated with Adamantite preset.`);else n.message(`\`${fe.config}\` not found, creating...`),yield*fe.create(e),n.stop(`\`${fe.config}\` created with Adamantite preset.`)}}),go=(e,t)=>j.gen(function*(){let r=yield*g,n=r.spinner();n.start("Installing editor extensions...");let o=e.includes("zed"),i=e.includes("vscode");if(yield*j.gen(function*(){if(e.includes("vscode"))n.message("Installing VS Code extension..."),yield*ne.extension(t);return!0}).pipe(j.tapError(()=>j.sync(()=>{n.stop()})),j.catchTag("FailedToInstallExtension",(u)=>j.gen(function*(){return yield*r.log.warning(`⚠️ Failed to install the \`${u.extension}\` extension.`),yield*r.log.warning("Please install it manually after setup completes."),!1})),j.catchTag("VscodeCliNotFound",()=>j.gen(function*(){return yield*r.log.error("VSCode CLI ('code' command) not found."),yield*r.log.info("To install it:"),yield*r.log.info(" 1. Open VS Code"),yield*r.log.info(" 2. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)"),yield*r.log.info(` 3. Run 'Shell Command: Install "code" command in PATH'`),!1}))))if(o&&!i)n.stop("Zed extensions require manual install.");else n.stop("Editor extensions installed successfully.");if(o)yield*r.log.info("Install the Zed `oxc` extension: zed://extension/oxc")}),Eo=(e,t,r)=>j.gen(function*(){let o=(yield*g).spinner();o.start("Setting up GitHub Actions workflow...");let i=yield*ie.exists(e),a=ie.files[0].path;if(i)o.message(`\`${a}\` found, updating...`),yield*ie.update(e,{packageManager:t,scripts:r}),o.stop("GitHub Actions workflow updated successfully.");else o.message(`Creating \`${a}\`...`),yield*ie.create(e,{packageManager:t,scripts:r}),o.stop("GitHub Actions workflow created successfully.")}).pipe(j.option),ar=Ue.make("init").pipe(Ue.withDescription("Initialize Adamantite in the current directory"),Ue.withHandler(()=>j.gen(function*(){let e=so.cwd(),t=yield*g;yield*Re(),yield*t.intro("\uD83D\uDCA0 adamantite init");let n=yield*(yield*Z).detectPackageManager(e);if(!n)return yield*new xe({});if(n.warnings?.length)for(let p of n.warnings)yield*t.log.warning(p);yield*t.log.info(`Detected package manager: ${n.name}`);let o=yield*Bt(e);if(o)yield*t.log.info("We've detected a monorepo setup in your project.");let i=yield*t.multiselect({message:"Which scripts do you want to add to your `package.json`?",options:[{hint:"recommended",label:"check - find issues and type errors using oxlint",value:"check"},{hint:"recommended",label:"fix - fix code issues using oxlint",value:"fix"},{hint:"recommended",label:"format - code formatting using oxfmt",value:"format"},{disabled:!o,hint:o?void 0:"available for monorepo projects",label:"check:monorepo - check for monorepo-specific issues using Sherif",value:"check:monorepo"},{disabled:!o,hint:o?void 0:"available for monorepo projects",label:"fix:monorepo - fix monorepo-specific issues using Sherif",value:"fix:monorepo"},{label:"analyze - find unused dependencies, exports, and files using knip",value:"analyze"}]}),a=i.includes("check")||i.includes("fix"),u=[];if(a)u=yield*t.multiselect({message:"Which presets do you want to install? (core is always included)",options:[{label:"React",value:"react"},{label:"Next.js",value:"nextjs"},{label:"Vue",value:"vue"},{label:"Jest",value:"jest"},{label:"Vitest",value:"vitest"},{label:"Node",value:"node"}],required:!1});let y=!1;if(a)y=yield*t.confirm({initialValue:!0,message:"Adamantite provides a TypeScript preset to enforce strict type-safety. Would you like to use it?"});let f=yield*t.multiselect({message:"Which editors do you want to configure? (optional)",options:[{label:"VSCode / Cursor / Windsurf",value:"vscode"},{label:"Zed",value:"zed"}],required:!1}),s=!1;if(f.length>0)s=yield*t.confirm({initialValue:!0,message:"Do you want to install the recommended editor extensions?"});let l=lt(i),h=!1;if(l)h=yield*t.confirm({message:"Do you want to add a GitHub Actions workflow to run checks in CI?"});let S=i.includes("format"),k=i.includes("check:monorepo")||i.includes("fix:monorepo"),P=i.includes("analyze"),J=["adamantite"];if(a)J.push(`${c.name}@${c.version}`),J.push(`${le.name}@${le.version}`);if(S)J.push(`${d.name}@${d.version}`);if(k)J.push(`${K.name}@${K.version}`);if(P)J.push(`${m.name}@${m.version}`);if(yield*lo(e,J),S)yield*uo(e);if(a)yield*po(e,u);if(P)yield*yo(e);if(yield*co(e,i),y)yield*mo(e);if(yield*ho(e,f),s)yield*go(f,i);if(h)yield*Eo(e,n.name,i);yield*t.log.success("Your project is now configured"),yield*t.outro("\uD83D\uDCA0 Adamantite initialized successfully!")}).pipe(j.catchTags({OperationCancelled:()=>j.gen(function*(){yield*(yield*g).cancel("You've cancelled the initialization process.")})}))));import*as fr from"effect/Effect";import*as be from"effect/unstable/cli/Command";import*as Ft from"effect/unstable/cli/Flag";import*as sr from"effect/unstable/process/ChildProcessSpawner";var jo=Ft.boolean("fix").pipe(Ft.withDescription("Automatically fix issues")),lr=be.make("monorepo",{fix:jo}).pipe(be.withDescription("Find and fix monorepo-specific issues using Sherif"),be.withHandler(({fix:e})=>fr.gen(function*(){let t=yield*R,r=e?["--fix"]:[],n=yield*t.run({args:r,command:K.name,stdin:"inherit"});if(n!==sr.ExitCode(0))yield*new A({command:K.name,exitCode:n})})));import*as pr from"effect/Effect";import*as qe from"effect/unstable/cli/Command";import*as ur from"effect/unstable/process/ChildProcessSpawner";var cr=qe.make("typecheck").pipe(qe.withDescription("Deprecated alias for `check`"),qe.withHandler(()=>pr.gen(function*(){let e=yield*g,t=yield*R;yield*e.log.warning("Deprecated. Use `adamantite check` for typechecking.");let r=yield*t.run({args:[],command:c.name});if(r!==ur.ExitCode(0))yield*new A({command:c.name,exitCode:r})})));import Oo from"node:process";import*as Y from"effect/Effect";import*as Je from"effect/unstable/cli/Command";var So=[c,le,d,K,m],Fo=[c,le,d,K,m];function $o(e){return e.applicable&&Array.isArray(e.actions)}function To(e,t){let r=[];for(let n of Fo){if(t.has(n.name))continue;let o=e.devDependencies?.[n.name]??e.dependencies?.[n.name];if(o&&B(o)!==n.version)r.push({currentVersion:o,name:n.name,targetVersion:n.version})}return r}var yr=Je.make("update").pipe(Je.withDescription("Run applicable Adamantite migrations and update managed dependencies"),Je.withHandler(()=>Y.gen(function*(){let e=Oo.cwd(),t=yield*g,r=yield*Z,n={cwd:e};yield*Re(),yield*t.intro("\uD83D\uDCA0 adamantite update");let o=()=>Y.gen(function*(){let p=[];for(let F of So){let Ke=yield*F.assess(e);if($o(Ke))p.push({assessment:Ke,integration:F})}return p}),i=yield*o();for(let{assessment:p}of i)for(let F of p.warnings)yield*t.log.warning(F);let a=new Set(i.map(({integration:p})=>p.name)),u=i.flatMap(({assessment:p})=>p.actions),y=new Set(u.filter((p)=>p.type==="run_migration").map((p)=>p.migrationId)),f=[];for(let p of dt.filter((F)=>F.tags.includes("update"))){let F=Un[p.id];if(a.has(F))continue;let Ke=yield*p.check(n);f.push({migration:p,result:Ke})}for(let p of f){for(let F of p.result.warnings)yield*t.log.warning(F);if(p.result.applicable&&p.result.summary)yield*t.log.info(p.result.summary)}let s=[];for(let p of dt){if(!y.has(p.id))continue;yield*Qe(p,n,{onRestore:t.log.warning(`Migration "${p.title}" failed, restoring files...`)}),s.push(p.id)}for(let{migration:p,result:F}of f){if(!F.applicable||!F.summary)continue;yield*Qe(p,n,{onRestore:t.log.warning(`Migration "${p.title}" failed, restoring files...`)}),s.push(p.id)}if(s.length>0)yield*t.log.success("Migrations ran successfully.");let l=yield*$(e),h=yield*o(),S=h.flatMap(({assessment:p})=>p.actions).filter((p)=>p.type==="create_config"||p.type==="update_config"||p.type==="manual_fix"),k=h.flatMap(({assessment:p})=>p.actions).filter((p)=>p.type==="install_package"||p.type==="update_package").map((p)=>p.type==="install_package"?{currentVersion:"not installed",name:p.package,targetVersion:p.targetVersion}:{currentVersion:p.currentVersion,name:p.package,targetVersion:p.targetVersion}),P=new Set(k.map((p)=>p.name)),J=[...k,...To(l,P)];if(J.length>0){yield*t.log.info("The following dependencies will be updated:");for(let F of J)yield*t.log.info(` ${F.name}: ${F.currentVersion} → ${F.targetVersion}`);let p=t.spinner();p.start("Updating dependencies..."),yield*r.addDevDependencies(J.map((F)=>`${F.name}@${F.targetVersion}`),e,{silent:!0}).pipe(Y.tapError(()=>Y.sync(()=>{p.stop("Failed to update dependencies")}))),p.stop("Dependencies updated successfully"),yield*t.log.success("Dependencies updated successfully.")}if(S.length>0){yield*t.log.warning("Some configuration follow-up belongs to `adamantite doctor --fix`.");for(let p of S)yield*t.log.warning(`Doctor follow-up: ${p.description}`)}if(s.length===0&&J.length===0&&S.length===0)return yield*t.log.success("No changes needed."),"no-changes";return"success"}).pipe(Y.tapError(()=>Y.gen(function*(){yield*(yield*g).outro("❌ Update failed")})),Y.tap((e)=>Y.gen(function*(){let t=yield*g;switch(e){case"no-changes":yield*t.outro("✅ Adamantite is already up to date.");break;case"success":yield*t.outro("✅ Update completed successfully!");break;default:break}})))));var vo=ye.make("adamantite").pipe(ye.withDescription("Opinionated preset package for modern TypeScript applications"),ye.withSubcommands([Ct,pn,Qn,Yn,Gn,ar,lr,cr,yr])),Po=await"0.32.0",_o=ye.run(vo,{version:Po}).pipe(M.as(0),M.catchTag("CommandFailed",(e)=>M.succeed(e.exitCode)),M.catch((e)=>M.service(g).pipe(M.flatMap((t)=>t.log.error(e.message)),M.as(jr.ExitCode(1)))),M.provide(gr.mergeAll(dr.layer,g.layer,R.layer,Z.layer)));mr.runMain(_o,{teardown:(e,t)=>{if(hr.isSuccess(e)){t(Number(e.value));return}Er.defaultTeardown(e,t)}});
112
+ `).pipe(j.mapError((y)=>new O({cause:y,path:u}))),a.stop("Scripts added to your `package.json`")}),yo=(e)=>j.gen(function*(){let t=yield*g,r=t.spinner();r.start("Setting up knip config...");let n=yield*m.exists(e);if(n.active?.format==="ts"&&n.legacy.length>0)yield*t.log.warning(`Found both \`${m.config}\` and \`knip.json(c)\`. Adamantite will use \`${m.config}\`.`);if(n.active&&n.active.format!=="ts"&&n.legacy.length>0)yield*t.log.warning("Found both `knip.json` and `knip.jsonc`. Multiple legacy knip configs exist; Adamantite will treat `knip.jsonc` as the source of truth when migration is needed.");if(n.active?.format==="json"||n.active?.format==="jsonc"){let o=n.active.path.endsWith(m.files[1].path)?m.files[1].path:m.files[2].path;r.message(`Found \`${o}\`, keeping existing config.`),r.stop("knip config is ready."),yield*Qt("knip",o)}else if(n.active?.format==="ts")r.message(`Found \`${m.config}\`, keeping existing config.`),r.stop("knip config is ready.");else r.message(`\`${m.config}\` not found, creating...`),yield*m.create(e),r.stop("knip config created successfully.")}),mo=(e)=>j.gen(function*(){let r=(yield*g).spinner();if(r.start("Setting up TypeScript config..."),yield*V.exists(e))r.message(`\`${V.config}\` found, updating...`),yield*V.update(e),r.stop(`\`${V.config}\` updated successfully`);else r.message(`\`${V.config}\` not found, creating...`),yield*V.create(e),r.stop(`\`${V.config}\` created successfully`)}),ho=(e,t)=>j.gen(function*(){let r=yield*g;if(t.includes("vscode")){let n=r.spinner();if(n.start(`Checking for \`${ne.config}\`...`),yield*ne.exists(e))n.message(`\`${ne.config}\` found, updating...`),yield*ne.update(e),n.stop(`\`${ne.config}\` updated with Adamantite preset.`);else n.message(`\`${ne.config}\` not found, creating...`),yield*ne.create(e),n.stop(`\`${ne.config}\` created with Adamantite preset.`)}if(t.includes("zed")){let n=r.spinner();if(n.start(`Checking for \`${fe.config}\`...`),yield*fe.exists(e))n.message(`\`${fe.config}\` found, updating...`),yield*fe.update(e),n.stop(`\`${fe.config}\` updated with Adamantite preset.`);else n.message(`\`${fe.config}\` not found, creating...`),yield*fe.create(e),n.stop(`\`${fe.config}\` created with Adamantite preset.`)}}),go=(e,t)=>j.gen(function*(){let r=yield*g,n=r.spinner();n.start("Installing editor extensions...");let o=e.includes("zed"),i=e.includes("vscode");if(yield*j.gen(function*(){if(e.includes("vscode"))n.message("Installing VS Code extension..."),yield*ne.extension(t);return!0}).pipe(j.tapError(()=>j.sync(()=>{n.stop()})),j.catchTag("FailedToInstallExtension",(u)=>j.gen(function*(){return yield*r.log.warning(`⚠️ Failed to install the \`${u.extension}\` extension.`),yield*r.log.warning("Please install it manually after setup completes."),!1})),j.catchTag("VscodeCliNotFound",()=>j.gen(function*(){return yield*r.log.error("VSCode CLI ('code' command) not found."),yield*r.log.info("To install it:"),yield*r.log.info(" 1. Open VS Code"),yield*r.log.info(" 2. Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux)"),yield*r.log.info(` 3. Run 'Shell Command: Install "code" command in PATH'`),!1}))))if(o&&!i)n.stop("Zed extensions require manual install.");else n.stop("Editor extensions installed successfully.");if(o)yield*r.log.info("Install the Zed `oxc` extension: zed://extension/oxc")}),Eo=(e,t,r)=>j.gen(function*(){let o=(yield*g).spinner();o.start("Setting up GitHub Actions workflow...");let i=yield*ie.exists(e),a=ie.files[0].path;if(i)o.message(`\`${a}\` found, updating...`),yield*ie.update(e,{packageManager:t,scripts:r}),o.stop("GitHub Actions workflow updated successfully.");else o.message(`Creating \`${a}\`...`),yield*ie.create(e,{packageManager:t,scripts:r}),o.stop("GitHub Actions workflow created successfully.")}).pipe(j.option),ar=Ue.make("init").pipe(Ue.withDescription("Initialize Adamantite in the current directory"),Ue.withHandler(()=>j.gen(function*(){let e=so.cwd(),t=yield*g;yield*Re(),yield*t.intro("\uD83D\uDCA0 adamantite init");let n=yield*(yield*Z).detectPackageManager(e);if(!n)return yield*new xe({});if(n.warnings?.length)for(let p of n.warnings)yield*t.log.warning(p);yield*t.log.info(`Detected package manager: ${n.name}`);let o=yield*Bt(e);if(o)yield*t.log.info("We've detected a monorepo setup in your project.");let i=yield*t.multiselect({message:"Which scripts do you want to add to your `package.json`?",options:[{hint:"recommended",label:"check - find issues and type errors using oxlint",value:"check"},{hint:"recommended",label:"fix - fix code issues using oxlint",value:"fix"},{hint:"recommended",label:"format - code formatting using oxfmt",value:"format"},{disabled:!o,hint:o?void 0:"available for monorepo projects",label:"check:monorepo - check for monorepo-specific issues using Sherif",value:"check:monorepo"},{disabled:!o,hint:o?void 0:"available for monorepo projects",label:"fix:monorepo - fix monorepo-specific issues using Sherif",value:"fix:monorepo"},{label:"analyze - find unused dependencies, exports, and files using knip",value:"analyze"}]}),a=i.includes("check")||i.includes("fix"),u=[];if(a)u=yield*t.multiselect({message:"Which presets do you want to install? (core is always included)",options:[{label:"React",value:"react"},{label:"Next.js",value:"nextjs"},{label:"Vue",value:"vue"},{label:"Jest",value:"jest"},{label:"Vitest",value:"vitest"},{label:"Node",value:"node"}],required:!1});let y=!1;if(a)y=yield*t.confirm({initialValue:!0,message:"Adamantite provides a TypeScript preset to enforce strict type-safety. Would you like to use it?"});let f=yield*t.multiselect({message:"Which editors do you want to configure? (optional)",options:[{label:"VSCode / Cursor / Windsurf",value:"vscode"},{label:"Zed",value:"zed"}],required:!1}),s=!1;if(f.length>0)s=yield*t.confirm({initialValue:!0,message:"Do you want to install the recommended editor extensions?"});let l=lt(i),h=!1;if(l)h=yield*t.confirm({message:"Do you want to add a GitHub Actions workflow to run checks in CI?"});let S=i.includes("format"),k=i.includes("check:monorepo")||i.includes("fix:monorepo"),P=i.includes("analyze"),J=["adamantite"];if(a)J.push(`${c.name}@${c.version}`),J.push(`${le.name}@${le.version}`);if(S)J.push(`${d.name}@${d.version}`);if(k)J.push(`${K.name}@${K.version}`);if(P)J.push(`${m.name}@${m.version}`);if(yield*lo(e,J),S)yield*uo(e);if(a)yield*po(e,u);if(P)yield*yo(e);if(yield*co(e,i),y)yield*mo(e);if(yield*ho(e,f),s)yield*go(f,i);if(h)yield*Eo(e,n.name,i);yield*t.log.success("Your project is now configured"),yield*t.outro("\uD83D\uDCA0 Adamantite initialized successfully!")}).pipe(j.catchTags({OperationCancelled:()=>j.gen(function*(){yield*(yield*g).cancel("You've cancelled the initialization process.")})}))));import*as fr from"effect/Effect";import*as be from"effect/unstable/cli/Command";import*as Ft from"effect/unstable/cli/Flag";import*as sr from"effect/unstable/process/ChildProcessSpawner";var jo=Ft.boolean("fix").pipe(Ft.withDescription("Automatically fix issues")),lr=be.make("monorepo",{fix:jo}).pipe(be.withDescription("Find and fix monorepo-specific issues using Sherif"),be.withHandler(({fix:e})=>fr.gen(function*(){let t=yield*R,r=e?["--fix"]:[],n=yield*t.run({args:r,command:K.name,stdin:"inherit"});if(n!==sr.ExitCode(0))yield*new A({command:K.name,exitCode:n})})));import*as pr from"effect/Effect";import*as qe from"effect/unstable/cli/Command";import*as ur from"effect/unstable/process/ChildProcessSpawner";var cr=qe.make("typecheck").pipe(qe.withDescription("Deprecated alias for `check`"),qe.withHandler(()=>pr.gen(function*(){let e=yield*g,t=yield*R;yield*e.log.warning("Deprecated. Use `adamantite check` for typechecking.");let r=yield*t.run({args:[],command:c.name});if(r!==ur.ExitCode(0))yield*new A({command:c.name,exitCode:r})})));import Oo from"node:process";import*as Y from"effect/Effect";import*as Je from"effect/unstable/cli/Command";var So=[c,le,d,K,m],Fo=[c,le,d,K,m];function $o(e){return e.applicable&&Array.isArray(e.actions)}function To(e,t){let r=[];for(let n of Fo){if(t.has(n.name))continue;let o=e.devDependencies?.[n.name]??e.dependencies?.[n.name];if(o&&B(o)!==n.version)r.push({currentVersion:o,name:n.name,targetVersion:n.version})}return r}var yr=Je.make("update").pipe(Je.withDescription("Run applicable Adamantite migrations and update managed dependencies"),Je.withHandler(()=>Y.gen(function*(){let e=Oo.cwd(),t=yield*g,r=yield*Z,n={cwd:e};yield*Re(),yield*t.intro("\uD83D\uDCA0 adamantite update");let o=()=>Y.gen(function*(){let p=[];for(let F of So){let Ke=yield*F.assess(e);if($o(Ke))p.push({assessment:Ke,integration:F})}return p}),i=yield*o();for(let{assessment:p}of i)for(let F of p.warnings)yield*t.log.warning(F);let a=new Set(i.map(({integration:p})=>p.name)),u=i.flatMap(({assessment:p})=>p.actions),y=new Set(u.filter((p)=>p.type==="run_migration").map((p)=>p.migrationId)),f=[];for(let p of dt.filter((F)=>F.tags.includes("update"))){let F=Un[p.id];if(a.has(F))continue;let Ke=yield*p.check(n);f.push({migration:p,result:Ke})}for(let p of f){for(let F of p.result.warnings)yield*t.log.warning(F);if(p.result.applicable&&p.result.summary)yield*t.log.info(p.result.summary)}let s=[];for(let p of dt){if(!y.has(p.id))continue;yield*Qe(p,n,{onRestore:t.log.warning(`Migration "${p.title}" failed, restoring files...`)}),s.push(p.id)}for(let{migration:p,result:F}of f){if(!F.applicable||!F.summary)continue;yield*Qe(p,n,{onRestore:t.log.warning(`Migration "${p.title}" failed, restoring files...`)}),s.push(p.id)}if(s.length>0)yield*t.log.success("Migrations ran successfully.");let l=yield*$(e),h=yield*o(),S=h.flatMap(({assessment:p})=>p.actions).filter((p)=>p.type==="create_config"||p.type==="update_config"||p.type==="manual_fix"),k=h.flatMap(({assessment:p})=>p.actions).filter((p)=>p.type==="install_package"||p.type==="update_package").map((p)=>p.type==="install_package"?{currentVersion:"not installed",name:p.package,targetVersion:p.targetVersion}:{currentVersion:p.currentVersion,name:p.package,targetVersion:p.targetVersion}),P=new Set(k.map((p)=>p.name)),J=[...k,...To(l,P)];if(J.length>0){yield*t.log.info("The following dependencies will be updated:");for(let F of J)yield*t.log.info(` ${F.name}: ${F.currentVersion} → ${F.targetVersion}`);let p=t.spinner();p.start("Updating dependencies..."),yield*r.addDevDependencies(J.map((F)=>`${F.name}@${F.targetVersion}`),e,{silent:!0}).pipe(Y.tapError(()=>Y.sync(()=>{p.stop("Failed to update dependencies")}))),p.stop("Dependencies updated successfully"),yield*t.log.success("Dependencies updated successfully.")}if(S.length>0){yield*t.log.warning("Some configuration follow-up belongs to `adamantite doctor --fix`.");for(let p of S)yield*t.log.warning(`Doctor follow-up: ${p.description}`)}if(s.length===0&&J.length===0&&S.length===0)return yield*t.log.success("No changes needed."),"no-changes";return"success"}).pipe(Y.tapError(()=>Y.gen(function*(){yield*(yield*g).outro("❌ Update failed")})),Y.tap((e)=>Y.gen(function*(){let t=yield*g;switch(e){case"no-changes":yield*t.outro("✅ Adamantite is already up to date.");break;case"success":yield*t.outro("✅ Update completed successfully!");break;default:break}})))));var vo=ye.make("adamantite").pipe(ye.withDescription("Opinionated preset package for modern TypeScript applications"),ye.withSubcommands([Ct,pn,Qn,Yn,Gn,ar,lr,cr,yr])),Po=await"0.32.1",_o=ye.run(vo,{version:Po}).pipe(M.as(0),M.catchTag("CommandFailed",(e)=>M.succeed(e.exitCode)),M.catch((e)=>M.service(g).pipe(M.flatMap((t)=>t.log.error(e.message)),M.as(jr.ExitCode(1)))),M.provide(gr.mergeAll(dr.layer,g.layer,R.layer,Z.layer)));mr.runMain(_o,{teardown:(e,t)=>{if(hr.isSuccess(e)){t(Number(e.value));return}Er.defaultTeardown(e,t)}});
@@ -1,23 +1,3 @@
1
- declare const _default: {
2
- readonly ignore: readonly ["**/*.d.ts"];
3
- readonly ignoreExportsUsedInFile: true;
4
- readonly ignoreFiles: readonly ["**/dist/**", "**/build/**", "**/coverage/**", "**/.next/**", "**/.vercel/**", "**/.turbo/**"];
5
- readonly rules: {
6
- readonly binaries: "error";
7
- readonly catalog: "error";
8
- readonly dependencies: "error";
9
- readonly devDependencies: "error";
10
- readonly duplicates: "warn";
11
- readonly enumMembers: "off";
12
- readonly exports: "warn";
13
- readonly files: "error";
14
- readonly namespaceMembers: "warn";
15
- readonly nsExports: "warn";
16
- readonly nsTypes: "warn";
17
- readonly optionalPeerDependencies: "warn";
18
- readonly types: "warn";
19
- readonly unlisted: "error";
20
- readonly unresolved: "error";
21
- };
22
- };
23
- export { _default as default };
1
+ import { RawConfiguration } from "./types/config.ts";
2
+ declare const config: RawConfiguration;
3
+ export { config as default };
@@ -1,5 +1,5 @@
1
1
  // presets/analyze.ts
2
- var analyze_default = {
2
+ var config = {
3
3
  ignore: ["**/*.d.ts"],
4
4
  ignoreExportsUsedInFile: true,
5
5
  ignoreFiles: [
@@ -28,6 +28,7 @@ var analyze_default = {
28
28
  unresolved: "error"
29
29
  }
30
30
  };
31
+ var analyze_default = config;
31
32
  export {
32
33
  analyze_default as default
33
34
  };
@@ -1,50 +1,3 @@
1
- declare const _default: {
2
- readonly arrowParens: "always";
3
- readonly bracketSameLine: false;
4
- readonly bracketSpacing: true;
5
- readonly embeddedLanguageFormatting: "auto";
6
- readonly endOfLine: "lf";
7
- readonly htmlWhitespaceSensitivity: "css";
8
- readonly insertFinalNewline: true;
9
- readonly jsdoc: {
10
- readonly addDefaultToDescription: true;
11
- readonly bracketSpacing: false;
12
- readonly capitalizeDescriptions: true;
13
- readonly commentLineStrategy: "multiline";
14
- readonly descriptionTag: false;
15
- readonly descriptionWithDot: false;
16
- readonly keepUnparsableExampleIndent: false;
17
- readonly lineWrappingStyle: "greedy";
18
- readonly preferCodeFences: false;
19
- readonly separateReturnsFromParam: true;
20
- };
21
- readonly jsxSingleQuote: false;
22
- readonly objectWrap: "preserve";
23
- readonly printWidth: 100;
24
- readonly quoteProps: "as-needed";
25
- readonly semi: false;
26
- readonly singleAttributePerLine: false;
27
- readonly singleQuote: false;
28
- readonly sortImports: {
29
- readonly groups: readonly [readonly ["value-builtin", "type-import"], readonly ["value-external"], readonly ["type-internal"], readonly ["value-internal"], readonly ["type-subpath"], readonly ["value-subpath"], readonly ["type-parent", "type-sibling", "type-index"], readonly ["value-parent", "value-sibling", "value-index"], readonly ["unknown"]];
30
- readonly ignoreCase: true;
31
- readonly newlinesBetween: false;
32
- readonly order: "asc";
33
- readonly partitionByComment: true;
34
- readonly partitionByNewline: true;
35
- readonly sortSideEffects: false;
36
- };
37
- readonly sortPackageJson: {
38
- readonly sortScripts: true;
39
- };
40
- readonly sortTailwindcss: {
41
- readonly attributes: readonly ["className", "class"];
42
- readonly functions: readonly ["clsx", "cn", "cva", "tw", "twMerge"];
43
- readonly preserveDuplicates: false;
44
- readonly preserveWhitespace: false;
45
- };
46
- readonly tabWidth: 2;
47
- readonly trailingComma: "es5";
48
- readonly useTabs: false;
49
- };
50
- export { _default as default };
1
+ import { FormatConfig } from "oxfmt";
2
+ declare const config: FormatConfig;
3
+ export { config as default };
@@ -1,5 +1,5 @@
1
1
  // presets/format.ts
2
- var format_default = {
2
+ var config = {
3
3
  arrowParens: "always",
4
4
  bracketSameLine: false,
5
5
  bracketSpacing: true,
@@ -58,6 +58,7 @@ var format_default = {
58
58
  trailingComma: "es5",
59
59
  useTabs: false
60
60
  };
61
+ var format_default = config;
61
62
  export {
62
63
  format_default as default
63
64
  };
@@ -1,435 +1,3 @@
1
- declare const _default: {
2
- readonly plugins: readonly ["eslint", "typescript", "unicorn", "oxc", "import", "jsdoc", "promise"];
3
- readonly rules: {
4
- readonly "accessor-pairs": "error";
5
- readonly "array-callback-return": "error";
6
- readonly "arrow-body-style": readonly ["error", "as-needed"];
7
- readonly "block-scoped-var": "error";
8
- readonly "capitalized-comments": readonly ["error", "always", {
9
- readonly ignoreConsecutiveComments: true;
10
- readonly ignoreInlineComments: true;
11
- }];
12
- readonly "class-methods-use-this": "warn";
13
- readonly "constructor-super": "error";
14
- readonly "default-case": "off";
15
- readonly "default-case-last": "error";
16
- readonly "default-param-last": "error";
17
- readonly eqeqeq: "error";
18
- readonly "for-direction": "error";
19
- readonly "getter-return": "error";
20
- readonly "grouped-accessor-pairs": "error";
21
- readonly "import/default": "error";
22
- readonly "import/first": "error";
23
- readonly "import/named": "error";
24
- readonly "import/namespace": "error";
25
- readonly "import/no-absolute-path": "error";
26
- readonly "import/no-amd": "error";
27
- readonly "import/no-cycle": "error";
28
- readonly "import/no-duplicates": "error";
29
- readonly "import/no-empty-named-blocks": "error";
30
- readonly "import/no-mutable-exports": "error";
31
- readonly "import/no-named-default": "error";
32
- readonly "import/no-nodejs-modules": "off";
33
- readonly "import/no-relative-parent-imports": "off";
34
- readonly "import/no-self-import": "error";
35
- readonly "import/unambiguous": "error";
36
- readonly "jsdoc/check-access": "error";
37
- readonly "jsdoc/check-property-names": "error";
38
- readonly "jsdoc/check-tag-names": readonly ["error", {
39
- readonly typed: true;
40
- }];
41
- readonly "jsdoc/empty-tags": "error";
42
- readonly "jsdoc/implements-on-classes": "error";
43
- readonly "jsdoc/no-defaults": "error";
44
- readonly "jsdoc/require-property": "error";
45
- readonly "jsdoc/require-property-description": "error";
46
- readonly "jsdoc/require-property-name": "error";
47
- readonly "jsdoc/require-property-type": "error";
48
- readonly "jsdoc/require-returns-description": "error";
49
- readonly "jsdoc/require-yields": "error";
50
- readonly "no-array-constructor": "error";
51
- readonly "no-async-promise-executor": "error";
52
- readonly "no-await-in-loop": "error";
53
- readonly "no-caller": "error";
54
- readonly "no-case-declarations": "error";
55
- readonly "no-class-assign": "error";
56
- readonly "no-compare-neg-zero": "error";
57
- readonly "no-cond-assign": "error";
58
- readonly "no-console": readonly ["warn", {
59
- readonly allow: readonly ["info"];
60
- }];
61
- readonly "no-const-assign": "error";
62
- readonly "no-constant-binary-expression": "error";
63
- readonly "no-constant-condition": "error";
64
- readonly "no-constructor-return": "error";
65
- readonly "no-control-regex": "error";
66
- readonly "no-debugger": "error";
67
- readonly "no-delete-var": "error";
68
- readonly "no-div-regex": "error";
69
- readonly "no-dupe-class-members": "error";
70
- readonly "no-dupe-else-if": "error";
71
- readonly "no-dupe-keys": "error";
72
- readonly "no-duplicate-case": "error";
73
- readonly "no-else-return": "error";
74
- readonly "no-empty": "error";
75
- readonly "no-empty-character-class": "error";
76
- readonly "no-empty-function": "error";
77
- readonly "no-empty-pattern": "error";
78
- readonly "no-empty-static-block": "error";
79
- readonly "no-eq-null": "error";
80
- readonly "no-eval": "error";
81
- readonly "no-ex-assign": "error";
82
- readonly "no-extend-native": "error";
83
- readonly "no-extra-bind": "error";
84
- readonly "no-extra-boolean-cast": "error";
85
- readonly "no-extra-label": "error";
86
- readonly "no-fallthrough": "error";
87
- readonly "no-func-assign": "error";
88
- readonly "no-global-assign": "error";
89
- readonly "no-import-assign": "error";
90
- readonly "no-inner-declarations": "error";
91
- readonly "no-invalid-regexp": "error";
92
- readonly "no-irregular-whitespace": "error";
93
- readonly "no-iterator": "error";
94
- readonly "no-label-var": "error";
95
- readonly "no-lone-blocks": "error";
96
- readonly "no-lonely-if": "error";
97
- readonly "no-loop-func": "error";
98
- readonly "no-loss-of-precision": "error";
99
- readonly "no-multi-assign": "error";
100
- readonly "no-multi-str": "error";
101
- readonly "no-negated-condition": "error";
102
- readonly "no-new": "error";
103
- readonly "no-new-func": "error";
104
- readonly "no-new-native-nonconstructor": "error";
105
- readonly "no-new-wrappers": "error";
106
- readonly "no-nonoctal-decimal-escape": "error";
107
- readonly "no-obj-calls": "error";
108
- readonly "no-object-constructor": "error";
109
- readonly "no-param-reassign": readonly ["error", {
110
- readonly props: true;
111
- }];
112
- readonly "no-plusplus": "error";
113
- readonly "no-promise-executor-return": "error";
114
- readonly "no-proto": "error";
115
- readonly "no-prototype-builtins": "error";
116
- readonly "no-redeclare": "error";
117
- readonly "no-regex-spaces": "error";
118
- readonly "no-return-assign": "error";
119
- readonly "no-script-url": "error";
120
- readonly "no-self-assign": "error";
121
- readonly "no-self-compare": "error";
122
- readonly "no-sequences": "error";
123
- readonly "no-setter-return": "error";
124
- readonly "no-shadow": "off";
125
- readonly "no-shadow-restricted-names": "error";
126
- readonly "no-sparse-arrays": "error";
127
- readonly "no-template-curly-in-string": "error";
128
- readonly "no-this-before-super": "error";
129
- readonly "no-unassigned-vars": "error";
130
- readonly "no-unexpected-multiline": "error";
131
- readonly "no-unmodified-loop-condition": "error";
132
- readonly "no-unneeded-ternary": "error";
133
- readonly "no-unsafe-finally": "error";
134
- readonly "no-unsafe-negation": "error";
135
- readonly "no-unsafe-optional-chaining": "error";
136
- readonly "no-unused-expressions": readonly ["error", {
137
- readonly allowTaggedTemplates: true;
138
- readonly allowTernary: true;
139
- readonly enforceForJSX: true;
140
- }];
141
- readonly "no-unused-labels": "error";
142
- readonly "no-unused-private-class-members": "error";
143
- readonly "no-unused-vars": "error";
144
- readonly "no-useless-assignment": "error";
145
- readonly "no-useless-backreference": "error";
146
- readonly "no-useless-call": "error";
147
- readonly "no-useless-catch": "error";
148
- readonly "no-useless-computed-key": "error";
149
- readonly "no-useless-concat": "error";
150
- readonly "no-useless-constructor": "error";
151
- readonly "no-useless-escape": "error";
152
- readonly "no-useless-rename": "error";
153
- readonly "no-useless-return": "error";
154
- readonly "no-var": "error";
155
- readonly "no-with": "error";
156
- readonly "object-shorthand": "error";
157
- readonly "operator-assignment": "error";
158
- readonly "oxc/approx-constant": "error";
159
- readonly "oxc/bad-array-method-on-arguments": "error";
160
- readonly "oxc/bad-bitwise-operator": "error";
161
- readonly "oxc/bad-char-at-comparison": "error";
162
- readonly "oxc/bad-comparison-sequence": "error";
163
- readonly "oxc/bad-min-max-func": "error";
164
- readonly "oxc/bad-object-literal-comparison": "error";
165
- readonly "oxc/bad-replace-all-arg": "error";
166
- readonly "oxc/branches-sharing-code": "error";
167
- readonly "oxc/const-comparisons": "error";
168
- readonly "oxc/double-comparisons": "error";
169
- readonly "oxc/erasing-op": "error";
170
- readonly "oxc/misrefactored-assign-op": "error";
171
- readonly "oxc/missing-throw": "error";
172
- readonly "oxc/no-accumulating-spread": "error";
173
- readonly "oxc/no-barrel-file": "error";
174
- readonly "oxc/no-const-enum": "error";
175
- readonly "oxc/no-map-spread": "error";
176
- readonly "oxc/no-this-in-exported-function": "error";
177
- readonly "oxc/number-arg-out-of-range": "error";
178
- readonly "oxc/only-used-in-recursion": "error";
179
- readonly "oxc/uninvoked-array-callback": "error";
180
- readonly "prefer-const": "error";
181
- readonly "prefer-exponentiation-operator": "error";
182
- readonly "prefer-object-has-own": "error";
183
- readonly "prefer-object-spread": "error";
184
- readonly "prefer-rest-params": "error";
185
- readonly "prefer-spread": "error";
186
- readonly "prefer-template": "error";
187
- readonly "preserve-caught-error": "error";
188
- readonly "promise/always-return": "error";
189
- readonly "promise/no-callback-in-promise": "error";
190
- readonly "promise/no-multiple-resolved": "error";
191
- readonly "promise/no-nesting": "error";
192
- readonly "promise/no-new-statics": "error";
193
- readonly "promise/no-promise-in-callback": "error";
194
- readonly "promise/no-return-in-finally": "error";
195
- readonly "promise/no-return-wrap": "error";
196
- readonly "promise/param-names": "error";
197
- readonly "promise/spec-only": "error";
198
- readonly "promise/valid-params": "error";
199
- readonly radix: "error";
200
- readonly "require-yield": "error";
201
- readonly "sort-keys": readonly ["error", "asc", {
202
- readonly allowLineSeparatedGroups: true;
203
- readonly caseSensitive: true;
204
- readonly natural: true;
205
- }];
206
- readonly "sort-vars": "error";
207
- readonly "symbol-description": "error";
208
- readonly "typescript/adjacent-overload-signatures": "error";
209
- readonly "typescript/array-type": readonly ["error", {
210
- readonly default: "array-simple";
211
- }];
212
- readonly "typescript/await-thenable": "error";
213
- readonly "typescript/ban-ts-comment": readonly ["error", {
214
- readonly minimumDescriptionLength: 3;
215
- readonly "ts-check": false;
216
- readonly "ts-expect-error": "allow-with-description";
217
- readonly "ts-ignore": true;
218
- readonly "ts-nocheck": "allow-with-description";
219
- }];
220
- readonly "typescript/ban-tslint-comment": "error";
221
- readonly "typescript/class-literal-property-style": "error";
222
- readonly "typescript/consistent-generic-constructors": "error";
223
- readonly "typescript/consistent-return": "off";
224
- readonly "typescript/consistent-type-assertions": "error";
225
- readonly "typescript/consistent-type-exports": "error";
226
- readonly "typescript/consistent-type-imports": "error";
227
- readonly "typescript/dot-notation": "off";
228
- readonly "typescript/no-array-delete": "error";
229
- readonly "typescript/no-base-to-string": "error";
230
- readonly "typescript/no-confusing-non-null-assertion": "error";
231
- readonly "typescript/no-confusing-void-expression": "error";
232
- readonly "typescript/no-duplicate-enum-values": "error";
233
- readonly "typescript/no-duplicate-type-constituents": "error";
234
- readonly "typescript/no-dynamic-delete": "error";
235
- readonly "typescript/no-empty-object-type": "error";
236
- readonly "typescript/no-explicit-any": "error";
237
- readonly "typescript/no-extra-non-null-assertion": "error";
238
- readonly "typescript/no-extraneous-class": "error";
239
- readonly "typescript/no-floating-promises": "error";
240
- readonly "typescript/no-for-in-array": "error";
241
- readonly "typescript/no-implied-eval": "error";
242
- readonly "typescript/no-import-type-side-effects": "error";
243
- readonly "typescript/no-inferrable-types": "error";
244
- readonly "typescript/no-invalid-void-type": "error";
245
- readonly "typescript/no-meaningless-void-operator": "error";
246
- readonly "typescript/no-misused-new": "error";
247
- readonly "typescript/no-misused-promises": "error";
248
- readonly "typescript/no-misused-spread": "error";
249
- readonly "typescript/no-mixed-enums": "error";
250
- readonly "typescript/no-namespace": "error";
251
- readonly "typescript/no-non-null-asserted-nullish-coalescing": "error";
252
- readonly "typescript/no-non-null-asserted-optional-chain": "error";
253
- readonly "typescript/no-non-null-assertion": "error";
254
- readonly "typescript/no-redundant-type-constituents": "error";
255
- readonly "typescript/no-this-alias": "error";
256
- readonly "typescript/no-unnecessary-boolean-literal-compare": "error";
257
- readonly "typescript/no-unnecessary-condition": "error";
258
- readonly "typescript/no-unnecessary-parameter-property-assignment": "error";
259
- readonly "typescript/no-unnecessary-qualifier": "error";
260
- readonly "typescript/no-unnecessary-template-expression": "error";
261
- readonly "typescript/no-unnecessary-type-arguments": "error";
262
- readonly "typescript/no-unnecessary-type-assertion": "error";
263
- readonly "typescript/no-unnecessary-type-constraint": "error";
264
- readonly "typescript/no-unnecessary-type-parameters": "error";
265
- readonly "typescript/no-unsafe-argument": "error";
266
- readonly "typescript/no-unsafe-call": "error";
267
- readonly "typescript/no-unsafe-declaration-merging": "error";
268
- readonly "typescript/no-unsafe-enum-comparison": "error";
269
- readonly "typescript/no-unsafe-function-type": "error";
270
- readonly "typescript/no-unsafe-return": "error";
271
- readonly "typescript/no-unsafe-unary-minus": "error";
272
- readonly "typescript/no-use-before-define": "off";
273
- readonly "typescript/no-useless-default-assignment": "error";
274
- readonly "typescript/no-useless-empty-export": "error";
275
- readonly "typescript/no-var-requires": "error";
276
- readonly "typescript/no-wrapper-object-types": "error";
277
- readonly "typescript/non-nullable-type-assertion-style": "error";
278
- readonly "typescript/parameter-properties": "error";
279
- readonly "typescript/prefer-as-const": "error";
280
- readonly "typescript/prefer-enum-initializers": "error";
281
- readonly "typescript/prefer-find": "error";
282
- readonly "typescript/prefer-for-of": "error";
283
- readonly "typescript/prefer-function-type": "error";
284
- readonly "typescript/prefer-includes": "error";
285
- readonly "typescript/prefer-literal-enum-member": "error";
286
- readonly "typescript/prefer-namespace-keyword": "error";
287
- readonly "typescript/prefer-nullish-coalescing": "error";
288
- readonly "typescript/prefer-optional-chain": "error";
289
- readonly "typescript/prefer-promise-reject-errors": "error";
290
- readonly "typescript/prefer-readonly": "off";
291
- readonly "typescript/prefer-readonly-parameter-types": "off";
292
- readonly "typescript/prefer-reduce-type-parameter": "error";
293
- readonly "typescript/prefer-regexp-exec": "off";
294
- readonly "typescript/prefer-return-this-type": "error";
295
- readonly "typescript/prefer-string-starts-ends-with": "error";
296
- readonly "typescript/prefer-ts-expect-error": "error";
297
- readonly "typescript/related-getter-setter-pairs": "error";
298
- readonly "typescript/require-array-sort-compare": "error";
299
- readonly "typescript/require-await": "error";
300
- readonly "typescript/restrict-plus-operands": "error";
301
- readonly "typescript/restrict-template-expressions": "error";
302
- readonly "typescript/return-await": readonly ["error", "error-handling-correctness-only"];
303
- readonly "typescript/strict-void-return": "off";
304
- readonly "typescript/switch-exhaustiveness-check": readonly ["error", {
305
- readonly considerDefaultExhaustiveForUnions: true;
306
- readonly requireDefaultForNonUnion: true;
307
- }];
308
- readonly "typescript/triple-slash-reference": "error";
309
- readonly "typescript/unbound-method": "error";
310
- readonly "typescript/unified-signatures": "error";
311
- readonly "typescript/use-unknown-in-catch-callback-variable": "error";
312
- readonly "unicode-bom": "error";
313
- readonly "unicorn/catch-error-name": "error";
314
- readonly "unicorn/consistent-assert": "error";
315
- readonly "unicorn/consistent-date-clone": "error";
316
- readonly "unicorn/consistent-empty-array-spread": "error";
317
- readonly "unicorn/consistent-existence-index-check": "error";
318
- readonly "unicorn/consistent-function-scoping": "error";
319
- readonly "unicorn/consistent-template-literal-escape": "error";
320
- readonly "unicorn/custom-error-definition": "error";
321
- readonly "unicorn/empty-brace-spaces": "error";
322
- readonly "unicorn/error-message": "error";
323
- readonly "unicorn/escape-case": "error";
324
- readonly "unicorn/explicit-length-check": "error";
325
- readonly "unicorn/filename-case": "error";
326
- readonly "unicorn/new-for-builtins": "error";
327
- readonly "unicorn/no-abusive-eslint-disable": "error";
328
- readonly "unicorn/no-accessor-recursion": "error";
329
- readonly "unicorn/no-array-callback-reference": "error";
330
- readonly "unicorn/no-array-method-this-argument": "error";
331
- readonly "unicorn/no-array-reverse": "error";
332
- readonly "unicorn/no-array-sort": "error";
333
- readonly "unicorn/no-await-expression-member": "error";
334
- readonly "unicorn/no-await-in-promise-methods": "error";
335
- readonly "unicorn/no-console-spaces": "error";
336
- readonly "unicorn/no-document-cookie": "error";
337
- readonly "unicorn/no-empty-file": "error";
338
- readonly "unicorn/no-hex-escape": "error";
339
- readonly "unicorn/no-immediate-mutation": "error";
340
- readonly "unicorn/no-instanceof-array": "error";
341
- readonly "unicorn/no-instanceof-builtins": "error";
342
- readonly "unicorn/no-invalid-fetch-options": "error";
343
- readonly "unicorn/no-invalid-remove-event-listener": "error";
344
- readonly "unicorn/no-length-as-slice-end": "error";
345
- readonly "unicorn/no-magic-array-flat-depth": "error";
346
- readonly "unicorn/no-negation-in-equality-check": "error";
347
- readonly "unicorn/no-new-array": "error";
348
- readonly "unicorn/no-new-buffer": "error";
349
- readonly "unicorn/no-object-as-default-parameter": "error";
350
- readonly "unicorn/no-single-promise-in-promise-methods": "error";
351
- readonly "unicorn/no-static-only-class": "error";
352
- readonly "unicorn/no-thenable": "error";
353
- readonly "unicorn/no-this-assignment": "error";
354
- readonly "unicorn/no-typeof-undefined": "error";
355
- readonly "unicorn/no-unnecessary-array-flat-depth": "error";
356
- readonly "unicorn/no-unnecessary-array-splice-count": "error";
357
- readonly "unicorn/no-unnecessary-await": "error";
358
- readonly "unicorn/no-unnecessary-slice-end": "error";
359
- readonly "unicorn/no-unreadable-array-destructuring": "error";
360
- readonly "unicorn/no-unreadable-iife": "error";
361
- readonly "unicorn/no-useless-collection-argument": "error";
362
- readonly "unicorn/no-useless-error-capture-stack-trace": "error";
363
- readonly "unicorn/no-useless-fallback-in-spread": "error";
364
- readonly "unicorn/no-useless-iterator-to-array": "error";
365
- readonly "unicorn/no-useless-length-check": "error";
366
- readonly "unicorn/no-useless-promise-resolve-reject": "error";
367
- readonly "unicorn/no-useless-spread": "error";
368
- readonly "unicorn/no-useless-switch-case": "error";
369
- readonly "unicorn/no-useless-undefined": "error";
370
- readonly "unicorn/no-zero-fractions": "error";
371
- readonly "unicorn/number-literal-case": "error";
372
- readonly "unicorn/numeric-separators-style": "error";
373
- readonly "unicorn/prefer-add-event-listener": "error";
374
- readonly "unicorn/prefer-array-find": "error";
375
- readonly "unicorn/prefer-array-flat": "error";
376
- readonly "unicorn/prefer-array-flat-map": "error";
377
- readonly "unicorn/prefer-array-index-of": "error";
378
- readonly "unicorn/prefer-array-some": "error";
379
- readonly "unicorn/prefer-at": "error";
380
- readonly "unicorn/prefer-bigint-literals": "error";
381
- readonly "unicorn/prefer-blob-reading-methods": "error";
382
- readonly "unicorn/prefer-class-fields": "error";
383
- readonly "unicorn/prefer-classlist-toggle": "error";
384
- readonly "unicorn/prefer-code-point": "error";
385
- readonly "unicorn/prefer-date-now": "error";
386
- readonly "unicorn/prefer-default-parameters": "error";
387
- readonly "unicorn/prefer-dom-node-append": "error";
388
- readonly "unicorn/prefer-dom-node-dataset": "error";
389
- readonly "unicorn/prefer-dom-node-remove": "error";
390
- readonly "unicorn/prefer-dom-node-text-content": "error";
391
- readonly "unicorn/prefer-event-target": "error";
392
- readonly "unicorn/prefer-global-this": "error";
393
- readonly "unicorn/prefer-import-meta-properties": "error";
394
- readonly "unicorn/prefer-keyboard-event-key": "error";
395
- readonly "unicorn/prefer-logical-operator-over-ternary": "error";
396
- readonly "unicorn/prefer-math-min-max": "error";
397
- readonly "unicorn/prefer-math-trunc": "error";
398
- readonly "unicorn/prefer-modern-dom-apis": "error";
399
- readonly "unicorn/prefer-module": "error";
400
- readonly "unicorn/prefer-native-coercion-functions": "error";
401
- readonly "unicorn/prefer-negative-index": "error";
402
- readonly "unicorn/prefer-node-protocol": "error";
403
- readonly "unicorn/prefer-number-properties": "error";
404
- readonly "unicorn/prefer-object-from-entries": "error";
405
- readonly "unicorn/prefer-optional-catch-binding": "error";
406
- readonly "unicorn/prefer-prototype-methods": "error";
407
- readonly "unicorn/prefer-query-selector": "error";
408
- readonly "unicorn/prefer-reflect-apply": "error";
409
- readonly "unicorn/prefer-regexp-test": "error";
410
- readonly "unicorn/prefer-response-static-json": "error";
411
- readonly "unicorn/prefer-set-has": "error";
412
- readonly "unicorn/prefer-set-size": "error";
413
- readonly "unicorn/prefer-string-replace-all": "error";
414
- readonly "unicorn/prefer-string-slice": "error";
415
- readonly "unicorn/prefer-string-starts-ends-with": "error";
416
- readonly "unicorn/prefer-string-trim-start-end": "error";
417
- readonly "unicorn/prefer-structured-clone": "error";
418
- readonly "unicorn/prefer-ternary": readonly ["error", "only-single-line"];
419
- readonly "unicorn/relative-url-style": "error";
420
- readonly "unicorn/require-array-join-separator": "error";
421
- readonly "unicorn/require-module-attributes": "error";
422
- readonly "unicorn/require-module-specifiers": "error";
423
- readonly "unicorn/require-number-to-fixed-digits-argument": "error";
424
- readonly "unicorn/require-post-message-target-origin": "error";
425
- readonly "unicorn/switch-case-braces": readonly ["error", "avoid"];
426
- readonly "unicorn/switch-case-break-position": "error";
427
- readonly "unicorn/text-encoding-identifier-case": "error";
428
- readonly "unicorn/throw-new-error": "error";
429
- readonly "use-isnan": "error";
430
- readonly "valid-typeof": "error";
431
- readonly "vars-on-top": "error";
432
- readonly yoda: "error";
433
- };
434
- };
435
- export { _default as default };
1
+ import { OxlintConfig } from "oxlint";
2
+ declare const config: OxlintConfig;
3
+ export { config as default };
@@ -1,5 +1,5 @@
1
1
  // presets/lint/core.ts
2
- var core_default = {
2
+ var config = {
3
3
  plugins: ["eslint", "typescript", "unicorn", "oxc", "import", "jsdoc", "promise"],
4
4
  rules: {
5
5
  "accessor-pairs": "error",
@@ -462,6 +462,7 @@ var core_default = {
462
462
  yoda: "error"
463
463
  }
464
464
  };
465
+ var core_default = config;
465
466
  export {
466
467
  core_default as default
467
468
  };
@@ -1,61 +1,3 @@
1
- declare const _default: {
2
- readonly plugins: readonly ["jest"];
3
- readonly rules: {
4
- readonly "jest/consistent-test-it": "error";
5
- readonly "jest/expect-expect": "error";
6
- readonly "jest/max-expects": "error";
7
- readonly "jest/max-nested-describe": "error";
8
- readonly "jest/no-alias-methods": "error";
9
- readonly "jest/no-commented-out-tests": "error";
10
- readonly "jest/no-conditional-expect": "error";
11
- readonly "jest/no-conditional-in-test": "error";
12
- readonly "jest/no-confusing-set-timeout": "error";
13
- readonly "jest/no-deprecated-functions": "error";
14
- readonly "jest/no-disabled-tests": "error";
15
- readonly "jest/no-done-callback": "error";
16
- readonly "jest/no-duplicate-hooks": "error";
17
- readonly "jest/no-export": "error";
18
- readonly "jest/no-focused-tests": "error";
19
- readonly "jest/no-hooks": "error";
20
- readonly "jest/no-identical-title": "error";
21
- readonly "jest/no-interpolation-in-snapshots": "error";
22
- readonly "jest/no-jasmine-globals": "error";
23
- readonly "jest/no-large-snapshots": "error";
24
- readonly "jest/no-mocks-import": "error";
25
- readonly "jest/no-restricted-jest-methods": "error";
26
- readonly "jest/no-restricted-matchers": "error";
27
- readonly "jest/no-standalone-expect": "error";
28
- readonly "jest/no-test-prefixes": "error";
29
- readonly "jest/no-test-return-statement": "error";
30
- readonly "jest/no-untyped-mock-factory": "error";
31
- readonly "jest/padding-around-after-all-blocks": "error";
32
- readonly "jest/padding-around-test-blocks": "error";
33
- readonly "jest/prefer-called-with": "error";
34
- readonly "jest/prefer-comparison-matcher": "error";
35
- readonly "jest/prefer-each": "error";
36
- readonly "jest/prefer-ending-with-an-expect": "error";
37
- readonly "jest/prefer-equality-matcher": "error";
38
- readonly "jest/prefer-expect-resolves": "error";
39
- readonly "jest/prefer-hooks-in-order": "error";
40
- readonly "jest/prefer-hooks-on-top": "error";
41
- readonly "jest/prefer-jest-mocked": "error";
42
- readonly "jest/prefer-lowercase-title": "error";
43
- readonly "jest/prefer-mock-promise-shorthand": "error";
44
- readonly "jest/prefer-spy-on": "error";
45
- readonly "jest/prefer-strict-equal": "error";
46
- readonly "jest/prefer-to-be": "error";
47
- readonly "jest/prefer-to-contain": "error";
48
- readonly "jest/prefer-to-have-been-called": "error";
49
- readonly "jest/prefer-to-have-been-called-times": "error";
50
- readonly "jest/prefer-to-have-length": "error";
51
- readonly "jest/prefer-todo": "error";
52
- readonly "jest/require-hook": "error";
53
- readonly "jest/require-to-throw-message": "error";
54
- readonly "jest/require-top-level-describe": "error";
55
- readonly "jest/valid-describe-callback": "error";
56
- readonly "jest/valid-expect": "error";
57
- readonly "jest/valid-expect-in-promise": "error";
58
- readonly "jest/valid-title": "error";
59
- };
60
- };
61
- export { _default as default };
1
+ import { OxlintConfig } from "oxlint";
2
+ declare const config: OxlintConfig;
3
+ export { config as default };
@@ -1,5 +1,5 @@
1
1
  // presets/lint/jest.ts
2
- var jest_default = {
2
+ var config = {
3
3
  plugins: ["jest"],
4
4
  rules: {
5
5
  "jest/consistent-test-it": "error",
@@ -59,6 +59,7 @@ var jest_default = {
59
59
  "jest/valid-title": "error"
60
60
  }
61
61
  };
62
+ var jest_default = config;
62
63
  export {
63
64
  jest_default as default
64
65
  };
@@ -1,27 +1,3 @@
1
- declare const _default: {
2
- readonly plugins: readonly ["nextjs"];
3
- readonly rules: {
4
- readonly "nextjs/google-font-display": "error";
5
- readonly "nextjs/google-font-preconnect": "error";
6
- readonly "nextjs/inline-script-id": "error";
7
- readonly "nextjs/next-script-for-ga": "error";
8
- readonly "nextjs/no-assign-module-variable": "error";
9
- readonly "nextjs/no-async-client-component": "error";
10
- readonly "nextjs/no-before-interactive-script-outside-document": "error";
11
- readonly "nextjs/no-css-tags": "error";
12
- readonly "nextjs/no-document-import-in-page": "error";
13
- readonly "nextjs/no-duplicate-head": "error";
14
- readonly "nextjs/no-head-element": "error";
15
- readonly "nextjs/no-head-import-in-document": "error";
16
- readonly "nextjs/no-html-link-for-pages": "error";
17
- readonly "nextjs/no-img-element": "error";
18
- readonly "nextjs/no-page-custom-font": "error";
19
- readonly "nextjs/no-script-component-in-head": "error";
20
- readonly "nextjs/no-styled-jsx-in-document": "error";
21
- readonly "nextjs/no-sync-scripts": "error";
22
- readonly "nextjs/no-title-in-document-head": "error";
23
- readonly "nextjs/no-typos": "error";
24
- readonly "nextjs/no-unwanted-polyfillio": "error";
25
- };
26
- };
27
- export { _default as default };
1
+ import { OxlintConfig } from "oxlint";
2
+ declare const config: OxlintConfig;
3
+ export { config as default };
@@ -1,5 +1,5 @@
1
1
  // presets/lint/nextjs.ts
2
- var nextjs_default = {
2
+ var config = {
3
3
  plugins: ["nextjs"],
4
4
  rules: {
5
5
  "nextjs/google-font-display": "error",
@@ -25,6 +25,7 @@ var nextjs_default = {
25
25
  "nextjs/no-unwanted-polyfillio": "error"
26
26
  }
27
27
  };
28
+ var nextjs_default = config;
28
29
  export {
29
30
  nextjs_default as default
30
31
  };
@@ -1,9 +1,3 @@
1
- declare const _default: {
2
- readonly plugins: readonly ["node"];
3
- readonly rules: {
4
- readonly "node/no-exports-assign": "error";
5
- readonly "node/no-new-require": "error";
6
- readonly "node/no-path-concat": "error";
7
- };
8
- };
9
- export { _default as default };
1
+ import { OxlintConfig } from "oxlint";
2
+ declare const config: OxlintConfig;
3
+ export { config as default };
@@ -1,5 +1,5 @@
1
1
  // presets/lint/node.ts
2
- var node_default = {
2
+ var config = {
3
3
  plugins: ["node"],
4
4
  rules: {
5
5
  "node/no-exports-assign": "error",
@@ -7,6 +7,7 @@ var node_default = {
7
7
  "node/no-path-concat": "error"
8
8
  }
9
9
  };
10
+ var node_default = config;
10
11
  export {
11
12
  node_default as default
12
13
  };
@@ -1,79 +1,3 @@
1
- declare const _default: {
2
- readonly plugins: readonly ["react", "react-perf", "jsx-a11y"];
3
- readonly rules: {
4
- readonly "jsx-a11y/alt-text": "error";
5
- readonly "jsx-a11y/anchor-has-content": "error";
6
- readonly "jsx-a11y/anchor-is-valid": "error";
7
- readonly "jsx-a11y/aria-activedescendant-has-tabindex": "error";
8
- readonly "jsx-a11y/aria-props": "error";
9
- readonly "jsx-a11y/aria-role": "error";
10
- readonly "jsx-a11y/aria-unsupported-elements": "error";
11
- readonly "jsx-a11y/autocomplete-valid": "error";
12
- readonly "jsx-a11y/click-events-have-key-events": "error";
13
- readonly "jsx-a11y/heading-has-content": "error";
14
- readonly "jsx-a11y/html-has-lang": "error";
15
- readonly "jsx-a11y/iframe-has-title": "error";
16
- readonly "jsx-a11y/img-redundant-alt": "error";
17
- readonly "jsx-a11y/label-has-associated-control": "error";
18
- readonly "jsx-a11y/lang": "error";
19
- readonly "jsx-a11y/media-has-caption": "error";
20
- readonly "jsx-a11y/mouse-events-have-key-events": "error";
21
- readonly "jsx-a11y/no-access-key": "error";
22
- readonly "jsx-a11y/no-ambiguous-text": "error";
23
- readonly "jsx-a11y/no-aria-hidden-on-focusable": "error";
24
- readonly "jsx-a11y/no-autofocus": "error";
25
- readonly "jsx-a11y/no-distracting-elements": "error";
26
- readonly "jsx-a11y/no-noninteractive-tabindex": "error";
27
- readonly "jsx-a11y/no-redundant-roles": "error";
28
- readonly "jsx-a11y/prefer-tag-over-role": "error";
29
- readonly "jsx-a11y/role-has-required-aria-props": "error";
30
- readonly "jsx-a11y/role-supports-aria-props": "error";
31
- readonly "jsx-a11y/scope": "error";
32
- readonly "jsx-a11y/tabindex-no-positive": "error";
33
- readonly "react/checked-requires-onchange-or-readonly": "error";
34
- readonly "react/display-name": "off";
35
- readonly "react/exhaustive-deps": "error";
36
- readonly "react/hook-use-state": "error";
37
- readonly "react/iframe-missing-sandbox": "error";
38
- readonly "react/jsx-boolean-value": "error";
39
- readonly "react/jsx-curly-brace-presence": readonly ["error", {
40
- readonly children: "never";
41
- readonly props: "never";
42
- }];
43
- readonly "react/jsx-fragments": readonly ["error", "syntax"];
44
- readonly "react/jsx-handler-names": "error";
45
- readonly "react/jsx-key": "error";
46
- readonly "react/jsx-no-comment-textnodes": "error";
47
- readonly "react/jsx-no-duplicate-props": "error";
48
- readonly "react/jsx-no-script-url": "error";
49
- readonly "react/jsx-no-target-blank": "error";
50
- readonly "react/jsx-no-undef": "error";
51
- readonly "react/jsx-no-useless-fragment": "error";
52
- readonly "react/jsx-pascal-case": "error";
53
- readonly "react/jsx-props-no-spread-multi": "error";
54
- readonly "react/no-array-index-key": "error";
55
- readonly "react/no-children-prop": "error";
56
- readonly "react/no-danger": "error";
57
- readonly "react/no-danger-with-children": "error";
58
- readonly "react/no-direct-mutation-state": "error";
59
- readonly "react/no-find-dom-node": "error";
60
- readonly "react/no-is-mounted": "error";
61
- readonly "react/no-multi-comp": "off";
62
- readonly "react/no-namespace": "error";
63
- readonly "react/no-redundant-should-component-update": "error";
64
- readonly "react/no-render-return-value": "error";
65
- readonly "react/no-set-state": "error";
66
- readonly "react/no-string-refs": "error";
67
- readonly "react/no-unescaped-entities": "error";
68
- readonly "react/no-unknown-property": "error";
69
- readonly "react/no-unsafe": "error";
70
- readonly "react/prefer-es6-class": readonly ["error", "always"];
71
- readonly "react/prefer-function-component": "error";
72
- readonly "react/rules-of-hooks": "error";
73
- readonly "react/self-closing-comp": "error";
74
- readonly "react/state-in-constructor": readonly ["error", "never"];
75
- readonly "react/style-prop-object": "error";
76
- readonly "react/void-dom-elements-no-children": "error";
77
- };
78
- };
79
- export { _default as default };
1
+ import { OxlintConfig } from "oxlint";
2
+ declare const config: OxlintConfig;
3
+ export { config as default };
@@ -1,5 +1,5 @@
1
1
  // presets/lint/react.ts
2
- var react_default = {
2
+ var config = {
3
3
  plugins: ["react", "react-perf", "jsx-a11y"],
4
4
  rules: {
5
5
  "jsx-a11y/alt-text": "error",
@@ -80,6 +80,7 @@ var react_default = {
80
80
  "react/void-dom-elements-no-children": "error"
81
81
  }
82
82
  };
83
+ var react_default = config;
83
84
  export {
84
85
  react_default as default
85
86
  };
@@ -1,23 +1,3 @@
1
- declare const _default: {
2
- readonly plugins: readonly ["vitest"];
3
- readonly rules: {
4
- readonly "vitest/consistent-each-for": "error";
5
- readonly "vitest/hoisted-apis-on-top": "error";
6
- readonly "vitest/no-conditional-tests": "error";
7
- readonly "vitest/no-import-node-test": "error";
8
- readonly "vitest/no-importing-vitest-globals": "error";
9
- readonly "vitest/no-unneeded-async-expect-function": "error";
10
- readonly "vitest/prefer-called-exactly-once-with": "error";
11
- readonly "vitest/prefer-called-once": "error";
12
- readonly "vitest/prefer-called-times": "error";
13
- readonly "vitest/prefer-describe-function-title": "error";
14
- readonly "vitest/prefer-expect-type-of": "error";
15
- readonly "vitest/prefer-import-in-mock": "error";
16
- readonly "vitest/prefer-strict-boolean-matchers": "error";
17
- readonly "vitest/prefer-to-be-object": "error";
18
- readonly "vitest/require-awaited-expect-poll": "error";
19
- readonly "vitest/require-local-test-context-for-concurrent-snapshots": "error";
20
- readonly "vitest/require-mock-type-parameters": "error";
21
- };
22
- };
23
- export { _default as default };
1
+ import { OxlintConfig } from "oxlint";
2
+ declare const config: OxlintConfig;
3
+ export { config as default };
@@ -1,5 +1,5 @@
1
1
  // presets/lint/vitest.ts
2
- var vitest_default = {
2
+ var config = {
3
3
  plugins: ["vitest"],
4
4
  rules: {
5
5
  "vitest/consistent-each-for": "error",
@@ -21,6 +21,7 @@ var vitest_default = {
21
21
  "vitest/require-mock-type-parameters": "error"
22
22
  }
23
23
  };
24
+ var vitest_default = config;
24
25
  export {
25
26
  vitest_default as default
26
27
  };
@@ -1,22 +1,3 @@
1
- declare const _default: {
2
- readonly plugins: readonly ["vue"];
3
- readonly rules: {
4
- readonly "vue/define-emits-declaration": "error";
5
- readonly "vue/define-props-declaration": "error";
6
- readonly "vue/define-props-destructuring": "error";
7
- readonly "vue/max-props": "error";
8
- readonly "vue/no-arrow-functions-in-watch": "error";
9
- readonly "vue/no-deprecated-destroyed-lifecycle": "error";
10
- readonly "vue/no-export-in-script-setup": "error";
11
- readonly "vue/no-import-compiler-macros": "error";
12
- readonly "vue/no-lifecycle-after-await": "error";
13
- readonly "vue/no-multiple-slot-args": "error";
14
- readonly "vue/no-required-prop-with-default": "error";
15
- readonly "vue/prefer-import-from-vue": "error";
16
- readonly "vue/require-default-export": "error";
17
- readonly "vue/require-typed-ref": "error";
18
- readonly "vue/valid-define-emits": "error";
19
- readonly "vue/valid-define-props": "error";
20
- };
21
- };
22
- export { _default as default };
1
+ import { OxlintConfig } from "oxlint";
2
+ declare const config: OxlintConfig;
3
+ export { config as default };
@@ -1,5 +1,5 @@
1
1
  // presets/lint/vue.ts
2
- var vue_default = {
2
+ var config = {
3
3
  plugins: ["vue"],
4
4
  rules: {
5
5
  "vue/define-emits-declaration": "error",
@@ -20,6 +20,7 @@ var vue_default = {
20
20
  "vue/valid-define-props": "error"
21
21
  }
22
22
  };
23
+ var vue_default = config;
23
24
  export {
24
25
  vue_default as default
25
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adamantite",
3
- "version": "0.32.0",
3
+ "version": "0.32.1",
4
4
  "description": "An strict and opinionated set of presets for modern TypeScript applications",
5
5
  "keywords": [
6
6
  "adamantite",
@@ -1,6 +1,6 @@
1
- import type { KnipConfig } from "knip"
1
+ import type { KnipConfiguration } from "knip"
2
2
 
3
- export default {
3
+ const config: KnipConfiguration = {
4
4
  ignore: ["**/*.d.ts"],
5
5
  ignoreExportsUsedInFile: true,
6
6
  ignoreFiles: [
@@ -28,4 +28,6 @@ export default {
28
28
  unlisted: "error",
29
29
  unresolved: "error",
30
30
  },
31
- } as const satisfies KnipConfig
31
+ }
32
+
33
+ export default config
package/presets/format.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { FormatConfig } from "oxfmt"
2
2
 
3
- export default {
3
+ const config: FormatConfig = {
4
4
  arrowParens: "always",
5
5
  bracketSameLine: false,
6
6
  bracketSpacing: true,
@@ -58,4 +58,6 @@ export default {
58
58
  tabWidth: 2,
59
59
  trailingComma: "es5",
60
60
  useTabs: false,
61
- } as const satisfies FormatConfig
61
+ }
62
+
63
+ export default config
@@ -1,6 +1,6 @@
1
1
  import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default {
3
+ const config: OxlintConfig = {
4
4
  plugins: ["eslint", "typescript", "unicorn", "oxc", "import", "jsdoc", "promise"],
5
5
  rules: {
6
6
  "accessor-pairs": "error",
@@ -462,4 +462,6 @@ export default {
462
462
  "vars-on-top": "error",
463
463
  yoda: "error",
464
464
  },
465
- } as const satisfies OxlintConfig
465
+ }
466
+
467
+ export default config
@@ -1,6 +1,6 @@
1
1
  import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default {
3
+ const config: OxlintConfig = {
4
4
  plugins: ["jest"],
5
5
  rules: {
6
6
  "jest/consistent-test-it": "error",
@@ -59,4 +59,6 @@ export default {
59
59
  "jest/valid-expect-in-promise": "error",
60
60
  "jest/valid-title": "error",
61
61
  },
62
- } as const satisfies OxlintConfig
62
+ }
63
+
64
+ export default config
@@ -1,6 +1,6 @@
1
1
  import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default {
3
+ const config: OxlintConfig = {
4
4
  plugins: ["nextjs"],
5
5
  rules: {
6
6
  "nextjs/google-font-display": "error",
@@ -25,4 +25,6 @@ export default {
25
25
  "nextjs/no-typos": "error",
26
26
  "nextjs/no-unwanted-polyfillio": "error",
27
27
  },
28
- } as const satisfies OxlintConfig
28
+ }
29
+
30
+ export default config
@@ -1,10 +1,12 @@
1
1
  import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default {
3
+ const config: OxlintConfig = {
4
4
  plugins: ["node"],
5
5
  rules: {
6
6
  "node/no-exports-assign": "error",
7
7
  "node/no-new-require": "error",
8
8
  "node/no-path-concat": "error",
9
9
  },
10
- } as const satisfies OxlintConfig
10
+ }
11
+
12
+ export default config
@@ -1,6 +1,6 @@
1
1
  import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default {
3
+ const config: OxlintConfig = {
4
4
  plugins: ["react", "react-perf", "jsx-a11y"],
5
5
  rules: {
6
6
  "jsx-a11y/alt-text": "error",
@@ -80,4 +80,6 @@ export default {
80
80
  "react/style-prop-object": "error",
81
81
  "react/void-dom-elements-no-children": "error",
82
82
  },
83
- } as const satisfies OxlintConfig
83
+ }
84
+
85
+ export default config
@@ -1,6 +1,6 @@
1
1
  import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default {
3
+ const config: OxlintConfig = {
4
4
  plugins: ["vitest"],
5
5
  rules: {
6
6
  "vitest/consistent-each-for": "error",
@@ -21,4 +21,6 @@ export default {
21
21
  "vitest/require-local-test-context-for-concurrent-snapshots": "error",
22
22
  "vitest/require-mock-type-parameters": "error",
23
23
  },
24
- } as const satisfies OxlintConfig
24
+ }
25
+
26
+ export default config
@@ -1,6 +1,6 @@
1
1
  import type { OxlintConfig } from "oxlint"
2
2
 
3
- export default {
3
+ const config: OxlintConfig = {
4
4
  plugins: ["vue"],
5
5
  rules: {
6
6
  "vue/define-emits-declaration": "error",
@@ -20,4 +20,6 @@ export default {
20
20
  "vue/valid-define-emits": "error",
21
21
  "vue/valid-define-props": "error",
22
22
  },
23
- } as const satisfies OxlintConfig
23
+ }
24
+
25
+ export default config