ultracite 7.0.7 → 7.0.9

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.
@@ -47,6 +47,8 @@
47
47
  "new-cap": "off",
48
48
  "no-continue": "off",
49
49
  "init-declarations": "off",
50
+ // Rely on oxfmt `experimentalSortImports` instead
51
+ "sort-imports": "off",
50
52
 
51
53
  "import/no-default-export": "off",
52
54
  "import/exports-last": "off",
@@ -78,6 +80,7 @@
78
80
  "typescript/no-require-imports": "off",
79
81
  "typescript/explicit-function-return-type": "off",
80
82
  "typescript/no-var-requires": "off",
83
+ "typescript/require-await":"off",
81
84
 
82
85
  "node/no-process-env": "off",
83
86
 
@@ -8,6 +8,7 @@
8
8
  "react/jsx-filename-extension": "off",
9
9
  "react/no-unknown-property": "off",
10
10
  "react/jsx-props-no-spreading": "off",
11
+ "react/jsx-max-depth": "off",
11
12
 
12
13
  "react_perf/jsx-no-jsx-as-prop": "off",
13
14
  "react_perf/jsx-no-new-object-as-prop": "off",
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- var C1=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var me=Object.prototype.hasOwnProperty;var S1=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),M1=t=>e=>{var o=t[e];if(o)return o();throw new Error("Module not found in bundle: "+e)};var $=(t,e)=>()=>(t&&(e=t(t=0)),e);var i1=(t,e)=>{for(var o in e)C1(t,o,{get:e[o],enumerable:!0})},pe=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of de(e))!me.call(t,n)&&n!==o&&C1(t,n,{get:()=>e[n],enumerable:!(i=fe(e,n))||i.enumerable});return t};var n1=t=>pe(C1({},"__esModule",{value:!0}),t);import{access as r2,mkdir as a2,readFile as St,writeFile as c2}from"fs/promises";import{dirname as l2}from"path";import{parse as f2}from"jsonc-parser";var l,C,b,d2,m2,h,z,p2,g2,u2,a1,p=$(()=>{"use strict";l=async t=>{try{return await r2(t),!0}catch{return!1}},C=async()=>{if(await l("pnpm-workspace.yaml"))return!0;try{let t=f2(await St("package.json","utf-8"));return t?!!t.workspaces||!!t.workspace:!1}catch{return!1}},b=async({dependencies:t,devDependencies:e,scripts:o})=>{let i=await St("package.json","utf8"),n=JSON.parse(i),s={...n};(n.devDependencies||e)&&(s.devDependencies={...n.devDependencies,...e}),(n.dependencies||t)&&(s.dependencies={...n.dependencies,...t}),(n.scripts||o)&&(s.scripts={...n.scripts,...o}),await c2("package.json",JSON.stringify(s,null,2))},d2=/[ $(){}[\]&|;<>!"'`*?#~]/,m2=/'/g,h=t=>t.map(e=>d2.test(e)?`'${e.replace(m2,"'\\''")}' `:e),z=async t=>{let e=l2(t);if(e!=="."){let o=e.startsWith("./")?e.slice(2):e;await a2(o,{recursive:!0})}},p2=["./biome.json","./biome.jsonc"],g2=["./eslint.config.mjs","./eslint.config.js","./eslint.config.cjs","./eslint.config.ts","./eslint.config.mts","./eslint.config.cts"],u2="./.oxlintrc.json",a1=async()=>{for(let t of p2)if(await l(t))return"biome";for(let t of g2)if(await l(t))return"eslint";return await l(u2)?"oxlint":null}});var Ut={};i1(Ut,{husky:()=>I});import{execSync as K2}from"child_process";import{mkdir as Y2,readFile as Z2,writeFile as $t}from"fs/promises";import{addDevDependency as q2,dlxCommand as I1}from"nypm";var _t,m1,I,F1=$(()=>{"use strict";p();_t=t=>`#!/bin/sh
2
+ var S1=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var pe=Object.prototype.hasOwnProperty;var j1=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,i)=>(typeof require<"u"?require:e)[i]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),J1=t=>e=>{var i=t[e];if(i)return i();throw new Error("Module not found in bundle: "+e)};var $=(t,e)=>()=>(t&&(e=t(t=0)),e);var o1=(t,e)=>{for(var i in e)S1(t,i,{get:e[i],enumerable:!0})},ge=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of me(e))!pe.call(t,n)&&n!==i&&S1(t,n,{get:()=>e[n],enumerable:!(o=fe(e,n))||o.enumerable});return t};var n1=t=>ge(S1({},"__esModule",{value:!0}),t);import{access as c2,mkdir as l2,readFile as jt,writeFile as d2}from"fs/promises";import{dirname as f2}from"path";import{parse as m2}from"jsonc-parser";var l,C,b,p2,g2,u,z,h2,u2,w2,c1,p=$(()=>{"use strict";l=async t=>{try{return await c2(t),!0}catch{return!1}},C=async()=>{if(await l("pnpm-workspace.yaml"))return!0;try{let t=m2(await jt("package.json","utf-8"));return t?!!t.workspaces||!!t.workspace:!1}catch{return!1}},b=async({dependencies:t,devDependencies:e,scripts:i})=>{let o=await jt("package.json","utf8"),n=JSON.parse(o),s={...n};(n.devDependencies||e)&&(s.devDependencies={...n.devDependencies,...e}),(n.dependencies||t)&&(s.dependencies={...n.dependencies,...t}),(n.scripts||i)&&(s.scripts={...n.scripts,...i}),await d2("package.json",JSON.stringify(s,null,2))},p2=/[ $(){}[\]&|;<>!"'`*?#~]/,g2=/'/g,u=t=>t.map(e=>p2.test(e)?`'${e.replace(g2,"'\\''")}' `:e),z=async t=>{let e=f2(t);if(e!=="."){let i=e.startsWith("./")?e.slice(2):e;await l2(i,{recursive:!0})}},h2=["./biome.json","./biome.jsonc"],u2=["./eslint.config.mjs","./eslint.config.js","./eslint.config.cjs","./eslint.config.ts","./eslint.config.mts","./eslint.config.cts"],w2="./.oxlintrc.json",c1=async()=>{for(let t of h2)if(await l(t))return"biome";for(let t of u2)if(await l(t))return"eslint";return await l(w2)?"oxlint":null}});var Ut={};o1(Ut,{husky:()=>I});import{execSync as Z2}from"child_process";import{mkdir as q2,readFile as t3,writeFile as _t}from"fs/promises";import{addDevDependency as e3,dlxCommand as F1}from"nypm";var Lt,p1,I,B1=$(()=>{"use strict";p();Lt=t=>`#!/bin/sh
3
3
  # Exit on any error
4
4
  set -e
5
5
 
@@ -67,10 +67,10 @@ if [ "$STAGED_HASH" != "$NEW_STAGED_HASH" ]; then
67
67
  fi
68
68
 
69
69
  exit $FORMAT_EXIT_CODE
70
- `,m1="./.husky/pre-commit",I={exists:()=>l(m1),install:async t=>{await q2("husky",{packageManager:t,workspace:await C(),silent:!0}),await b({scripts:{prepare:"husky"}})},init:t=>{let e=I1(t,"husky",{args:["init"]});try{K2(e,{stdio:"pipe"})}catch{}},create:async t=>{await Y2(".husky",{recursive:!0});let e=I1(t,"ultracite",{args:["fix"],short:t==="npm"}),o=_t(e);await $t(m1,o)},update:async t=>{let e=await Z2(m1,"utf-8"),o=I1(t,"ultracite",{args:["fix"],short:t==="npm"}),i=_t(o);await $t(m1,`${e}
71
- ${i}`)}}});var Nt={};i1(Nt,{lefthook:()=>H});import{execSync as t3}from"child_process";import{readFile as e3,writeFile as Y}from"fs/promises";import{addDevDependency as o3,dlxCommand as Dt}from"nypm";var i3,n3,Rt,F,Lt,H,B1=$(()=>{"use strict";p();i3=/(pre-commit:\s*\n\s*jobs:\s*\n)/,n3=/(pre-commit:\s*\n)/,Rt=t=>Dt(t,"ultracite",{args:["fix"],short:t==="npm"}),F="./lefthook.yml",Lt=t=>`pre-commit:
70
+ `,p1="./.husky/pre-commit",I={exists:()=>l(p1),install:async t=>{await e3("husky",{packageManager:t,workspace:await C(),silent:!0}),await b({scripts:{prepare:"husky"}})},init:t=>{let e=F1(t,"husky",{args:["init"]});try{Z2(e,{stdio:"pipe"})}catch{}},create:async t=>{await q2(".husky",{recursive:!0});let e=F1(t,"ultracite",{args:["fix"],short:t==="npm"}),i=Lt(e);await _t(p1,i)},update:async t=>{let e=await t3(p1,"utf-8"),i=F1(t,"ultracite",{args:["fix"],short:t==="npm"}),o=Lt(i);await _t(p1,`${e}
71
+ ${o}`)}}});var Tt={};o1(Tt,{lefthook:()=>H});import{execSync as i3}from"child_process";import{readFile as o3,writeFile as Y}from"fs/promises";import{addDevDependency as n3,dlxCommand as Rt}from"nypm";var s3,r3,Nt,F,Dt,H,$1=$(()=>{"use strict";p();s3=/(pre-commit:\s*\n\s*jobs:\s*\n)/,r3=/(pre-commit:\s*\n)/,Nt=t=>Rt(t,"ultracite",{args:["fix"],short:t==="npm"}),F="./lefthook.yml",Dt=t=>`pre-commit:
72
72
  jobs:
73
- - run: ${Rt(t)}
73
+ - run: ${Nt(t)}
74
74
  glob:
75
75
  - "*.js"
76
76
  - "*.jsx"
@@ -80,7 +80,7 @@ ${i}`)}}});var Nt={};i1(Nt,{lefthook:()=>H});import{execSync as t3}from"child_pr
80
80
  - "*.jsonc"
81
81
  - "*.css"
82
82
  stage_fixed: true
83
- `,H={exists:()=>l(F),install:async t=>{await o3("lefthook",{packageManager:t,workspace:await C(),silent:!0}),await b({scripts:{prepare:"lefthook install"}});let e=Dt(t,"lefthook",{args:["install"],short:t==="npm"});t3(e,{stdio:"pipe"})},create:async t=>{let e=Lt(t);await Y(F,e)},update:async t=>{let e=await e3(F,"utf-8"),o=Rt(t),i=Lt(t);if(e.includes(o))return;if(e.startsWith("# EXAMPLE USAGE:")){await Y(F,i);return}if(e.includes("pre-commit:"))if(e.includes("jobs:")){let s=` - run: ${o}
83
+ `,H={exists:()=>l(F),install:async t=>{await n3("lefthook",{packageManager:t,workspace:await C(),silent:!0}),await b({scripts:{prepare:"lefthook install"}});let e=Rt(t,"lefthook",{args:["install"],short:t==="npm"});i3(e,{stdio:"pipe"})},create:async t=>{let e=Dt(t);await Y(F,e)},update:async t=>{let e=await o3(F,"utf-8"),i=Nt(t),o=Dt(t);if(e.includes(i))return;if(e.startsWith("# EXAMPLE USAGE:")){await Y(F,o);return}if(e.includes("pre-commit:"))if(e.includes("jobs:")){let s=` - run: ${i}
84
84
  glob:
85
85
  - "*.js"
86
86
  - "*.jsx"
@@ -89,9 +89,9 @@ ${i}`)}}});var Nt={};i1(Nt,{lefthook:()=>H});import{execSync as t3}from"child_pr
89
89
  - "*.json"
90
90
  - "*.jsonc"
91
91
  - "*.css"
92
- stage_fixed: true`,r=e.replace(i3,`$1${s}
92
+ stage_fixed: true`,r=e.replace(s3,`$1${s}
93
93
  `);await Y(F,r)}else{let s=` jobs:
94
- - run: ${o}
94
+ - run: ${i}
95
95
  glob:
96
96
  - "*.js"
97
97
  - "*.jsx"
@@ -100,47 +100,47 @@ ${i}`)}}});var Nt={};i1(Nt,{lefthook:()=>H});import{execSync as t3}from"child_pr
100
100
  - "*.json"
101
101
  - "*.jsonc"
102
102
  - "*.css"
103
- stage_fixed: true`,r=e.replace(n3,`$1${s}
103
+ stage_fixed: true`,r=e.replace(r3,`$1${s}
104
104
  `);await Y(F,r)}else await Y(F,`${e}
105
- ${i}`)}}});var Gt={};i1(Gt,{preCommit:()=>q});import{readFile as s3,writeFile as $1}from"fs/promises";import{dlxCommand as r3}from"nypm";var Z,a3,Tt,c3,q,_1=$(()=>{"use strict";p();Z="./.pre-commit-config.yaml",a3=/^repos:\s*\n/m,Tt=t=>r3(t,"ultracite",{args:["fix"],short:t==="npm"}),c3=t=>`repos:
105
+ ${o}`)}}});var Mt={};o1(Mt,{preCommit:()=>q});import{readFile as a3,writeFile as _1}from"fs/promises";import{dlxCommand as c3}from"nypm";var Z,l3,Gt,d3,q,L1=$(()=>{"use strict";p();Z="./.pre-commit-config.yaml",l3=/^repos:\s*\n/m,Gt=t=>c3(t,"ultracite",{args:["fix"],short:t==="npm"}),d3=t=>`repos:
106
106
  - repo: local
107
107
  hooks:
108
108
  - id: ultracite
109
109
  name: ultracite
110
- entry: ${Tt(t)}
110
+ entry: ${Gt(t)}
111
111
  language: system
112
112
  types_or: [javascript, jsx, ts, tsx, json, css]
113
113
  pass_filenames: false
114
- `,q={exists:()=>l(Z),create:async t=>{let e=c3(t);await $1(Z,e)},update:async t=>{let e=await s3(Z,"utf-8"),o=Tt(t);if(e.includes("id: ultracite"))return;let i=` - repo: local
114
+ `,q={exists:()=>l(Z),create:async t=>{let e=d3(t);await _1(Z,e)},update:async t=>{let e=await a3(Z,"utf-8"),i=Gt(t);if(e.includes("id: ultracite"))return;let o=` - repo: local
115
115
  hooks:
116
116
  - id: ultracite
117
117
  name: ultracite
118
- entry: ${o}
118
+ entry: ${i}
119
119
  language: system
120
120
  types_or: [javascript, jsx, ts, tsx, json, css]
121
121
  pass_filenames: false
122
- `;if(e.includes("repos:")){let n=e.replace(a3,`repos:
123
- ${i}`);await $1(Z,n)}else await $1(Z,`${e}
122
+ `;if(e.includes("repos:")){let n=e.replace(l3,`repos:
123
+ ${o}`);await _1(Z,n)}else await _1(Z,`${e}
124
124
  repos:
125
- ${i}`)}}});var l3,U1=$(()=>{l3=M1({"./husky.ts":()=>(F1(),n1(Ut)),"./lefthook.ts":()=>(B1(),n1(Nt)),"./lint-staged.ts":()=>(L1(),n1(Mt)),"./pre-commit.ts":()=>(_1(),n1(Gt))})});var Mt={};i1(Mt,{lintStaged:()=>V});import{readFile as p1,writeFile as B}from"fs/promises";import{pathToFileURL as f3}from"url";import t1 from"deepmerge";import{parse as R1}from"jsonc-parser";import{addDevDependency as d3,dlxCommand as m3}from"nypm";var j,Jt,p3,g3,u3,h3,w3,x3,y3,v3,k3,D1,b3,V,L1=$(()=>{"use strict";p();U1();j=t=>({"*.{js,jsx,ts,tsx,json,jsonc,css,scss,md,mdx}":[m3(t,"ultracite",{args:["fix"],short:t==="npm"})]}),Jt=["./package.json","./.lintstagedrc.json","./.lintstagedrc.js","./.lintstagedrc.cjs","./.lintstagedrc.mjs","./lint-staged.config.js","./lint-staged.config.cjs","./lint-staged.config.mjs","./.lintstagedrc.yaml","./.lintstagedrc.yml","./.lintstagedrc"],p3=(t,e,o,i)=>{let n=t.trim();if(n.includes(":")&&!n.startsWith("-")){o&&i.length>0&&(e[o]=i);let[s,...r]=n.split(":"),a=r.join(":").trim(),d=s.trim().replace(/['"]/g,"");return a&&a!==""?(a.startsWith("[")&&a.endsWith("]")?e[d]=a.slice(1,-1).split(",").map(m=>m.trim().replace(/['"]/g,"")):e[d]=a.replace(/['"]/g,""),{newCurrentKey:null,newCurrentArray:[]}):{newCurrentKey:d,newCurrentArray:[]}}if(n.startsWith("-")&&o){let s=[...i,n.slice(1).trim().replace(/['"]/g,"")];return{newCurrentKey:o,newCurrentArray:s}}return{newCurrentKey:o,newCurrentArray:i}},g3=t=>{let e=t.split(`
126
- `).filter(s=>s.trim()&&!s.trim().startsWith("#")),o={},i=null,n=[];for(let s of e){let r=p3(s,o,i,n);i=r.newCurrentKey,n=r.newCurrentArray}return i&&n.length>0&&(o[i]=n),o},u3=t=>{let e="";for(let[o,i]of Object.entries(t))if(Array.isArray(i)){e+=`${o}:
127
- `;for(let n of i)e+=` - '${n}'
128
- `}else e+=`${o}: '${i}'
129
- `;return e},h3=async()=>{try{let t=R1(await p1("./package.json","utf-8"));return t?t.type==="module":!1}catch{return!1}},w3=async t=>{let e=R1(await p1("./package.json","utf-8"));e&&(e["lint-staged"]?e["lint-staged"]=t1(e["lint-staged"],j(t)):e["lint-staged"]=j(t),await B("./package.json",JSON.stringify(e,null,2)))},x3=async(t,e)=>{let o=await p1(t,"utf-8"),i=R1(o);if(!i)return;let n=t1(i,j(e));await B(t,JSON.stringify(n,null,2))},y3=async(t,e)=>{let o=await p1(t,"utf-8"),i=g3(o);if(!i)return;let n=t1(i,j(e));await B(t,u3(n))},v3=async(t,e)=>{let n=(await import(f3(t).href)).default||{},s=t1(n,j(e)),r=`export default ${JSON.stringify(s,null,2)};
130
- `;await B(t,r)},k3=async(t,e)=>{delete S1.cache[S1.resolve(`./${t}`)];let o=l3(`./${t}`),i=t1(o,j(e)),n=`module.exports = ${JSON.stringify(i,null,2)};
131
- `;await B(t,n)},D1=async t=>{await B(".lintstagedrc.json",JSON.stringify(j(t),null,2))},b3=async(t,e)=>{if(t==="./package.json"){await w3(e);return}if(t.endsWith(".json")||t==="./.lintstagedrc"){await x3(t,e);return}if(t.endsWith(".yaml")||t.endsWith(".yml")){await y3(t,e);return}let o=await h3();if(t.endsWith(".mjs")||t.endsWith(".js")&&o){try{await v3(t,e)}catch{await D1(e)}return}if(t.endsWith(".cjs")||t.endsWith(".js")&&!o)try{await k3(t,e)}catch{await D1(e)}},V={exists:async()=>{for(let t of Jt)if(await l(t))return!0;return!1},install:async t=>{await d3("lint-staged",{packageManager:t,workspace:await C(),silent:!0})},create:async t=>{await B(".lintstagedrc.json",JSON.stringify(j(t),null,2))},update:async t=>{let e=null;for(let o of Jt)if(await l(o)){e=o;break}if(!e){await D1(t);return}await b3(e,t)}}});var J1="./aider-K7JLZT2D.svg";var W1="./amazon-q-TSOJNPXB.svg";var H1="./amp-EV4LVL5I.svg";var V1="./augmentcode-Q62PVXKO.svg";var X1="./claude-6DLEHRDQ.svg";var Q1="./cline-6HWKIYN7.svg";var K1="./codex-NQZ5TJCL.svg";var Y1="./copilot-L2IY45R2.svg";var Z1="./crush-LYLRDQGZ.svg";var q1="./droid-266OHJBT.svg";var tt="./firebase-studio-ILLWWYU7.svg";var et="./firebender-UNO6LSZG.svg";var ot="./gemini-OYS6V4BH.svg";var it="./goose-XBIEVD4H.svg";var nt="./jules-HJPVWU73.svg";var st="./junie-RUWBUV6N.svg";var rt="./kilo-code-4QYUYY2E.svg";var at="./open-hands-K5EYKO6T.svg";var ct="./opencode-K3274JKQ.svg";var lt="./qwen-N3D5CQYL.svg";var ft="./roo-code-CVLBTS7D.svg";var dt="./warp-OZKAAQRT.svg";var _=[{id:"claude",name:"Claude Code",subtitle:"Anthropic's agentic CLI",description:"Anthropic's official CLI for Claude, an agentic coding tool that lives in your terminal.",config:{path:".claude/CLAUDE.md",appendMode:!0},logo:X1},{id:"codex",name:"Codex",subtitle:"OpenAI's coding agent",description:"OpenAI's cloud-based coding agent for autonomous software development tasks.",config:{path:"AGENTS.md",appendMode:!0},logo:K1},{id:"jules",name:"Jules",subtitle:"Google's async agent",description:"Google's asynchronous AI coding agent that works in the background to complete development tasks.",config:{path:"AGENTS.md",appendMode:!0},logo:nt},{id:"copilot",name:"GitHub Copilot",subtitle:"GitHub's AI pair programmer",description:"GitHub's AI pair programmer that suggests code completions and helps write code faster.",config:{path:".github/copilot-instructions.md",appendMode:!0,header:`---
125
+ ${o}`)}}});var f3,U1=$(()=>{f3=J1({"./husky.ts":()=>(B1(),n1(Ut)),"./lefthook.ts":()=>($1(),n1(Tt)),"./lint-staged.ts":()=>(D1(),n1(Jt)),"./pre-commit.ts":()=>(L1(),n1(Mt))})});var Jt={};o1(Jt,{lintStaged:()=>V});import{readFile as g1,writeFile as B}from"fs/promises";import{pathToFileURL as m3}from"url";import t1 from"deepmerge";import{parse as N1}from"jsonc-parser";import{addDevDependency as p3,dlxCommand as g3}from"nypm";var j,Wt,h3,u3,w3,x3,v3,y3,k3,b3,z3,R1,C3,V,D1=$(()=>{"use strict";p();U1();j=t=>({"*.{js,jsx,ts,tsx,json,jsonc,css,scss,md,mdx}":[g3(t,"ultracite",{args:["fix"],short:t==="npm"})]}),Wt=["./package.json","./.lintstagedrc.json","./.lintstagedrc.js","./.lintstagedrc.cjs","./.lintstagedrc.mjs","./lint-staged.config.js","./lint-staged.config.cjs","./lint-staged.config.mjs","./.lintstagedrc.yaml","./.lintstagedrc.yml","./.lintstagedrc"],h3=(t,e,i,o)=>{let n=t.trim();if(n.includes(":")&&!n.startsWith("-")){i&&o.length>0&&(e[i]=o);let[s,...r]=n.split(":"),a=r.join(":").trim(),f=s.trim().replace(/['"]/g,"");return a&&a!==""?(a.startsWith("[")&&a.endsWith("]")?e[f]=a.slice(1,-1).split(",").map(m=>m.trim().replace(/['"]/g,"")):e[f]=a.replace(/['"]/g,""),{newCurrentKey:null,newCurrentArray:[]}):{newCurrentKey:f,newCurrentArray:[]}}if(n.startsWith("-")&&i){let s=[...o,n.slice(1).trim().replace(/['"]/g,"")];return{newCurrentKey:i,newCurrentArray:s}}return{newCurrentKey:i,newCurrentArray:o}},u3=t=>{let e=t.split(`
126
+ `).filter(s=>s.trim()&&!s.trim().startsWith("#")),i={},o=null,n=[];for(let s of e){let r=h3(s,i,o,n);o=r.newCurrentKey,n=r.newCurrentArray}return o&&n.length>0&&(i[o]=n),i},w3=t=>{let e="";for(let[i,o]of Object.entries(t))if(Array.isArray(o)){e+=`${i}:
127
+ `;for(let n of o)e+=` - '${n}'
128
+ `}else e+=`${i}: '${o}'
129
+ `;return e},x3=async()=>{try{let t=N1(await g1("./package.json","utf-8"));return t?t.type==="module":!1}catch{return!1}},v3=async t=>{let e=N1(await g1("./package.json","utf-8"));e&&(e["lint-staged"]?e["lint-staged"]=t1(e["lint-staged"],j(t)):e["lint-staged"]=j(t),await B("./package.json",JSON.stringify(e,null,2)))},y3=async(t,e)=>{let i=await g1(t,"utf-8"),o=N1(i);if(!o)return;let n=t1(o,j(e));await B(t,JSON.stringify(n,null,2))},k3=async(t,e)=>{let i=await g1(t,"utf-8"),o=u3(i);if(!o)return;let n=t1(o,j(e));await B(t,w3(n))},b3=async(t,e)=>{let n=(await import(m3(t).href)).default||{},s=t1(n,j(e)),r=`export default ${JSON.stringify(s,null,2)};
130
+ `;await B(t,r)},z3=async(t,e)=>{delete j1.cache[j1.resolve(`./${t}`)];let i=f3(`./${t}`),o=t1(i,j(e)),n=`module.exports = ${JSON.stringify(o,null,2)};
131
+ `;await B(t,n)},R1=async t=>{await B(".lintstagedrc.json",JSON.stringify(j(t),null,2))},C3=async(t,e)=>{if(t==="./package.json"){await v3(e);return}if(t.endsWith(".json")||t==="./.lintstagedrc"){await y3(t,e);return}if(t.endsWith(".yaml")||t.endsWith(".yml")){await k3(t,e);return}let i=await x3();if(t.endsWith(".mjs")||t.endsWith(".js")&&i){try{await b3(t,e)}catch{await R1(e)}return}if(t.endsWith(".cjs")||t.endsWith(".js")&&!i)try{await z3(t,e)}catch{await R1(e)}},V={exists:async()=>{for(let t of Wt)if(await l(t))return!0;return!1},install:async t=>{await p3("lint-staged",{packageManager:t,workspace:await C(),silent:!0})},create:async t=>{await B(".lintstagedrc.json",JSON.stringify(j(t),null,2))},update:async t=>{let e=null;for(let i of Wt)if(await l(i)){e=i;break}if(!e){await R1(t);return}await C3(e,t)}}});var W1="./aider-K7JLZT2D.svg";var H1="./amazon-q-TSOJNPXB.svg";var V1="./amp-EV4LVL5I.svg";var X1="./augmentcode-Q62PVXKO.svg";var Q1="./claude-6DLEHRDQ.svg";var K1="./cline-6HWKIYN7.svg";var Y1="./codex-NQZ5TJCL.svg";var Z1="./copilot-L2IY45R2.svg";var q1="./crush-LYLRDQGZ.svg";var s1="./cursor-GQNH5LCA.svg";var tt="./droid-266OHJBT.svg";var et="./firebase-studio-ILLWWYU7.svg";var it="./firebender-UNO6LSZG.svg";var ot="./gemini-OYS6V4BH.svg";var nt="./goose-XBIEVD4H.svg";var st="./jules-HJPVWU73.svg";var rt="./junie-RUWBUV6N.svg";var at="./kilo-code-4QYUYY2E.svg";var ct="./mistral-HQ63EC2B.svg";var lt="./open-hands-K5EYKO6T.svg";var dt="./opencode-K3274JKQ.svg";var ft="./qwen-N3D5CQYL.svg";var mt="./roo-code-CVLBTS7D.svg";var pt="./warp-OZKAAQRT.svg";var _=[{id:"claude",name:"Claude Code",subtitle:"Anthropic's agentic CLI",description:"Anthropic's official CLI for Claude, an agentic coding tool that lives in your terminal.",config:{path:".claude/CLAUDE.md",appendMode:!0},logo:Q1},{id:"codex",name:"Codex",subtitle:"OpenAI's coding agent",description:"OpenAI's cloud-based coding agent for autonomous software development tasks.",config:{path:"AGENTS.md",appendMode:!0},logo:Y1},{id:"jules",name:"Jules",subtitle:"Google's async agent",description:"Google's asynchronous AI coding agent that works in the background to complete development tasks.",config:{path:"AGENTS.md",appendMode:!0},logo:st},{id:"copilot",name:"GitHub Copilot",subtitle:"GitHub's AI pair programmer",description:"GitHub's AI pair programmer that suggests code completions and helps write code faster.",config:{path:".github/copilot-instructions.md",appendMode:!0,header:`---
132
132
  applyTo: "**/*.{ts,tsx,js,jsx}"
133
- ---`},logo:Y1},{id:"cline",name:"Cline",subtitle:"Autonomous VS Code agent",description:"An autonomous coding agent for VS Code that can create and edit files, run commands, and more.",config:{path:".clinerules",appendMode:!0},logo:Q1},{id:"amp",name:"AMP",subtitle:"Sourcegraph's coding agent",description:"Sourcegraph's AI coding agent that understands your entire codebase for intelligent assistance.",config:{path:"AGENT.md",appendMode:!0},logo:H1},{id:"aider",name:"Aider",subtitle:"Terminal pair programming",description:"AI pair programming in your terminal with support for multiple LLM providers.",config:{path:"ultracite.md"},logo:J1},{id:"firebase-studio",name:"Firebase Studio",subtitle:"Google's cloud IDE",description:"Google's AI-powered development environment integrated with Firebase services.",config:{path:".idx/airules.md",appendMode:!0},logo:tt},{id:"open-hands",name:"OpenHands",subtitle:"Open-source AI agents",description:"An open-source platform for AI software development agents with autonomous capabilities.",config:{path:".openhands/microagents/repo.md",appendMode:!0},logo:at},{id:"gemini",name:"Gemini",subtitle:"Google's terminal AI",description:"Google's command-line interface for Gemini, bringing AI assistance to your terminal.",config:{path:"GEMINI.md",appendMode:!0},logo:ot},{id:"junie",name:"Junie",subtitle:"JetBrains' AI agent",description:"JetBrains' AI coding agent integrated into their IDE ecosystem.",config:{path:".junie/guidelines.md",appendMode:!0},logo:st},{id:"augmentcode",name:"Augment Code",subtitle:"Enterprise AI assistant",description:"An AI coding assistant focused on enterprise development workflows and team collaboration.",config:{path:".augment/rules/ultracite.md"},logo:V1},{id:"kilo-code",name:"Kilo Code",subtitle:"Customizable VS Code AI",description:"A VS Code extension providing AI-powered coding assistance with customizable rules.",config:{path:".kilocode/rules/ultracite.md"},logo:rt},{id:"goose",name:"Goose",subtitle:"Block's open-source agent",description:"Block's open-source AI developer agent for autonomous software development.",config:{path:".goosehints",appendMode:!0},logo:it},{id:"roo-code",name:"Roo Code",subtitle:"Codebase navigation AI",description:"An AI coding assistant focused on understanding and navigating complex codebases.",config:{path:".roo/rules/ultracite.md",appendMode:!0},logo:ft},{id:"warp",name:"Warp",subtitle:"Modern AI terminal",description:"A modern terminal with AI-powered command suggestions and workflow automation.",config:{path:"WARP.md",appendMode:!0},logo:dt},{id:"droid",name:"Droid",subtitle:"Automated code generation",description:"An AI development agent focused on automated code generation and task completion.",config:{path:"AGENTS.md",appendMode:!0},logo:q1},{id:"opencode",name:"OpenCode",subtitle:"Open-source coding agent",description:"An open-source AI coding agent that runs in your terminal, desktop, or IDE with support for 75+ LLM providers.",config:{path:"AGENTS.md",appendMode:!0},logo:ct},{id:"crush",name:"Crush",subtitle:"Glamorous terminal agent",description:"Charmbracelet's glamorous AI coding agent for your terminal with multi-model support.",config:{path:"CRUSH.md",appendMode:!0},logo:Z1},{id:"qwen",name:"Qwen Code",subtitle:"Alibaba's coding CLI",description:"Alibaba's command-line interface for Qwen3-Coder, enabling agentic coding with natural language.",config:{path:"AGENTS.md",appendMode:!0},logo:lt},{id:"amazon-q-cli",name:"Amazon Q CLI",subtitle:"AWS's terminal AI",description:"Amazon's AI-powered CLI with command autocompletion, natural language chat, and AWS integration.",config:{path:".amazonq/rules/ultracite.md",appendMode:!0},logo:W1},{id:"firebender",name:"Firebender",subtitle:"Android Studio AI",description:"The most powerful AI coding assistant for Android Studio with codebase context and up-to-date Android knowledge.",config:{path:"firebender.json"},logo:et}];import U from"deepmerge";var mt="./antigravity-JVONECNW.svg";var pt="./cursor-GQNH5LCA.svg";var gt="./kiro-N2M256R6.svg";var ut="./trae-RXVCFBOF.svg";var ht="./void-NYH3U3BB.svg";var wt="./vscode-DEOUEB65.svg";var xt="./windsurf-5T7JOTST.svg";var yt="./zed-SIARPESF.svg";var s1={"editor.defaultFormatter":"esbenp.prettier-vscode","typescript.tsdk":"node_modules/typescript/lib","editor.formatOnSave":!0,"editor.formatOnPaste":!0,"emmet.showExpandedAbbreviation":"never"},Je={"[javascript]":{"editor.defaultFormatter":"biomejs.biome"},"[typescript]":{"editor.defaultFormatter":"biomejs.biome"},"[javascriptreact]":{"editor.defaultFormatter":"biomejs.biome"},"[typescriptreact]":{"editor.defaultFormatter":"biomejs.biome"},"[json]":{"editor.defaultFormatter":"biomejs.biome"},"[jsonc]":{"editor.defaultFormatter":"biomejs.biome"},"[html]":{"editor.defaultFormatter":"biomejs.biome"},"[vue]":{"editor.defaultFormatter":"biomejs.biome"},"[svelte]":{"editor.defaultFormatter":"biomejs.biome"},"[css]":{"editor.defaultFormatter":"biomejs.biome"},"[yaml]":{"editor.defaultFormatter":"biomejs.biome"},"[graphql]":{"editor.defaultFormatter":"biomejs.biome"},"[markdown]":{"editor.defaultFormatter":"biomejs.biome"},"[mdx]":{"editor.defaultFormatter":"biomejs.biome"},"editor.codeActionsOnSave":{"source.fixAll.biome":"explicit","source.organizeImports.biome":"explicit"}},We={"[javascript]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[javascriptreact]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[typescript]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[typescriptreact]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[json]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[jsonc]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[yaml]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[html]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[vue]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[vue-html]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[handlebars]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[css]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[scss]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[less]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[graphql]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[markdown]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"editor.codeActionsOnSave":{"source.fixAll.oxc":"explicit"}},He={"editor.codeActionsOnSave":{"source.fixAll.eslint":"explicit","source.organizeImports":"explicit"}},E=(t="biome")=>{switch(t){case"biome":return U(s1,Je);case"eslint":return U(s1,He);case"oxlint":return U(s1,We);default:return s1}},r1={formatter:"language_server",format_on_save:"on",lsp:{"typescript-language-server":{settings:{typescript:{preferences:{includePackageJsonAutoImports:"on"}}}}}},Ve={languages:{JavaScript:{formatter:{language_server:{name:"biome"}},code_actions_on_format:{"source.fixAll.biome":!0,"source.organizeImports.biome":!0}},TypeScript:{formatter:{language_server:{name:"biome"}},code_actions_on_format:{"source.fixAll.biome":!0,"source.organizeImports.biome":!0}},TSX:{formatter:{language_server:{name:"biome"}},code_actions_on_format:{"source.fixAll.biome":!0,"source.organizeImports.biome":!0}}}},Xe={languages:{JavaScript:{formatter:{language_server:{name:"eslint"}},code_actions_on_format:{"source.fixAll.eslint":!0,"source.organizeImports.eslint":!0}},TypeScript:{formatter:{language_server:{name:"eslint"}},code_actions_on_format:{"source.fixAll.eslint":!0,"source.organizeImports.eslint":!0}},TSX:{formatter:{language_server:{name:"eslint"}},code_actions_on_format:{"source.fixAll.eslint":!0,"source.organizeImports.eslint":!0}}}},Qe={languages:{JavaScript:{formatter:{language_server:{name:"oxfmt"}},code_actions_on_format:{"source.fixAll.oxc":!0,"source.organizeImports.oxc":!0}},TypeScript:{formatter:{language_server:{name:"oxfmt"}},code_actions_on_format:{"source.fixAll.oxc":!0,"source.organizeImports.oxc":!0}},TSX:{formatter:{language_server:{name:"oxfmt"}},code_actions_on_format:{"source.fixAll.oxc":!0,"source.organizeImports.oxc":!0}}},lsp:{oxlint:{initialization_options:{settings:{disableNestedConfig:!1,fixKind:"safe_fix",run:"onType",typeAware:!0,unusedDisableDirectives:"deny"}}},oxfmt:{initialization_options:{settings:{configPath:null,flags:{},"fmt.configPath":null,"fmt.experimental":!0,run:"onSave",typeAware:!1,unusedDisableDirectives:!1}}}}},Ke=(t="biome")=>{switch(t){case"biome":return U(r1,Ve);case"eslint":return U(r1,Xe);case"oxlint":return U(r1,Qe);default:return r1}},x=[{id:"vscode",name:"Visual Studio Code",subtitle:"The most popular code editor",description:"Microsoft's popular code editor with extensive extension support and built-in Git integration.",logo:wt,config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"cursor",name:"Cursor",subtitle:"The AI-first code editor",description:"The AI-first code editor built on VS Code with deep AI integration for coding assistance.",logo:pt,rules:{path:".cursor/rules/ultracite.mdc",header:`---
133
+ ---`},logo:Z1},{id:"cline",name:"Cline",subtitle:"Autonomous VS Code agent",description:"An autonomous coding agent for VS Code that can create and edit files, run commands, and more.",config:{path:".clinerules",appendMode:!0},logo:K1},{id:"amp",name:"AMP",subtitle:"Sourcegraph's coding agent",description:"Sourcegraph's AI coding agent that understands your entire codebase for intelligent assistance.",config:{path:"AGENT.md",appendMode:!0},logo:V1},{id:"aider",name:"Aider",subtitle:"Terminal pair programming",description:"AI pair programming in your terminal with support for multiple LLM providers.",config:{path:"ultracite.md"},logo:W1},{id:"firebase-studio",name:"Firebase Studio",subtitle:"Google's cloud IDE",description:"Google's AI-powered development environment integrated with Firebase services.",config:{path:".idx/airules.md",appendMode:!0},logo:et},{id:"open-hands",name:"OpenHands",subtitle:"Open-source AI agents",description:"An open-source platform for AI software development agents with autonomous capabilities.",config:{path:".openhands/microagents/repo.md",appendMode:!0},logo:lt},{id:"gemini",name:"Gemini",subtitle:"Google's terminal AI",description:"Google's command-line interface for Gemini, bringing AI assistance to your terminal.",config:{path:"GEMINI.md",appendMode:!0},logo:ot},{id:"junie",name:"Junie",subtitle:"JetBrains' AI agent",description:"JetBrains' AI coding agent integrated into their IDE ecosystem.",config:{path:".junie/guidelines.md",appendMode:!0},logo:rt},{id:"augmentcode",name:"Augment Code",subtitle:"Enterprise AI assistant",description:"An AI coding assistant focused on enterprise development workflows and team collaboration.",config:{path:".augment/rules/ultracite.md"},logo:X1},{id:"kilo-code",name:"Kilo Code",subtitle:"Customizable VS Code AI",description:"A VS Code extension providing AI-powered coding assistance with customizable rules.",config:{path:".kilocode/rules/ultracite.md"},logo:at},{id:"goose",name:"Goose",subtitle:"Block's open-source agent",description:"Block's open-source AI developer agent for autonomous software development.",config:{path:".goosehints",appendMode:!0},logo:nt},{id:"roo-code",name:"Roo Code",subtitle:"Codebase navigation AI",description:"An AI coding assistant focused on understanding and navigating complex codebases.",config:{path:".roo/rules/ultracite.md",appendMode:!0},logo:mt},{id:"warp",name:"Warp",subtitle:"Modern AI terminal",description:"A modern terminal with AI-powered command suggestions and workflow automation.",config:{path:"WARP.md",appendMode:!0},logo:pt},{id:"droid",name:"Droid",subtitle:"Automated code generation",description:"An AI development agent focused on automated code generation and task completion.",config:{path:"AGENTS.md",appendMode:!0},logo:tt},{id:"opencode",name:"OpenCode",subtitle:"Open-source coding agent",description:"An open-source AI coding agent that runs in your terminal, desktop, or IDE with support for 75+ LLM providers.",config:{path:"AGENTS.md",appendMode:!0},logo:dt},{id:"crush",name:"Crush",subtitle:"Glamorous terminal agent",description:"Charmbracelet's glamorous AI coding agent for your terminal with multi-model support.",config:{path:"CRUSH.md",appendMode:!0},logo:q1},{id:"qwen",name:"Qwen Code",subtitle:"Alibaba's coding CLI",description:"Alibaba's command-line interface for Qwen3-Coder, enabling agentic coding with natural language.",config:{path:"AGENTS.md",appendMode:!0},logo:ft},{id:"amazon-q-cli",name:"Amazon Q CLI",subtitle:"AWS's terminal AI",description:"Amazon's AI-powered CLI with command autocompletion, natural language chat, and AWS integration.",config:{path:".amazonq/rules/ultracite.md",appendMode:!0},logo:H1},{id:"firebender",name:"Firebender",subtitle:"Android Studio AI",description:"The most powerful AI coding assistant for Android Studio with codebase context and up-to-date Android knowledge.",config:{path:"firebender.json"},logo:it},{id:"cursor-cli",name:"Cursor CLI",subtitle:"Cursor's terminal agent",description:"Cursor's CLI, built to help you ship right from your terminal.",config:{path:".cursor/rules/ultracite.mdc",appendMode:!0},logo:s1},{id:"mistral-vibe",name:"Mistral Vibe",subtitle:"Minimal CLI coding agent",description:"Mistral's minimal CLI coding agent for streamlined development tasks.",config:{path:"VIBE.md"},logo:ct}];import L from"deepmerge";var gt="./antigravity-JVONECNW.svg";var ht="./kiro-N2M256R6.svg";var ut="./trae-RXVCFBOF.svg";var wt="./void-NYH3U3BB.svg";var xt="./vscode-DEOUEB65.svg";var vt="./windsurf-5T7JOTST.svg";var yt="./zed-SIARPESF.svg";var r1={"editor.defaultFormatter":"esbenp.prettier-vscode","typescript.tsdk":"node_modules/typescript/lib","editor.formatOnSave":!0,"editor.formatOnPaste":!0,"emmet.showExpandedAbbreviation":"never"},He={"[javascript]":{"editor.defaultFormatter":"biomejs.biome"},"[typescript]":{"editor.defaultFormatter":"biomejs.biome"},"[javascriptreact]":{"editor.defaultFormatter":"biomejs.biome"},"[typescriptreact]":{"editor.defaultFormatter":"biomejs.biome"},"[json]":{"editor.defaultFormatter":"biomejs.biome"},"[jsonc]":{"editor.defaultFormatter":"biomejs.biome"},"[html]":{"editor.defaultFormatter":"biomejs.biome"},"[vue]":{"editor.defaultFormatter":"biomejs.biome"},"[svelte]":{"editor.defaultFormatter":"biomejs.biome"},"[css]":{"editor.defaultFormatter":"biomejs.biome"},"[yaml]":{"editor.defaultFormatter":"biomejs.biome"},"[graphql]":{"editor.defaultFormatter":"biomejs.biome"},"[markdown]":{"editor.defaultFormatter":"biomejs.biome"},"[mdx]":{"editor.defaultFormatter":"biomejs.biome"},"editor.codeActionsOnSave":{"source.fixAll.biome":"explicit","source.organizeImports.biome":"explicit"}},Ve={"[javascript]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[javascriptreact]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[typescript]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[typescriptreact]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[json]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[jsonc]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[yaml]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[html]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[vue]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[vue-html]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[handlebars]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[css]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[scss]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[less]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[graphql]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"[markdown]":{"editor.defaultFormatter":"oxc.oxc-vscode"},"editor.codeActionsOnSave":{"source.fixAll.oxc":"explicit"}},Xe={"editor.codeActionsOnSave":{"source.fixAll.eslint":"explicit","source.organizeImports":"explicit"}},E=(t="biome")=>{switch(t){case"biome":return L(r1,He);case"eslint":return L(r1,Xe);case"oxlint":return L(r1,Ve);default:return r1}},a1={formatter:"language_server",format_on_save:"on",lsp:{"typescript-language-server":{settings:{typescript:{preferences:{includePackageJsonAutoImports:"on"}}}}}},Qe={languages:{JavaScript:{formatter:{language_server:{name:"biome"}},code_actions_on_format:{"source.fixAll.biome":!0,"source.organizeImports.biome":!0}},TypeScript:{formatter:{language_server:{name:"biome"}},code_actions_on_format:{"source.fixAll.biome":!0,"source.organizeImports.biome":!0}},TSX:{formatter:{language_server:{name:"biome"}},code_actions_on_format:{"source.fixAll.biome":!0,"source.organizeImports.biome":!0}}}},Ke={languages:{JavaScript:{formatter:{language_server:{name:"eslint"}},code_actions_on_format:{"source.fixAll.eslint":!0,"source.organizeImports.eslint":!0}},TypeScript:{formatter:{language_server:{name:"eslint"}},code_actions_on_format:{"source.fixAll.eslint":!0,"source.organizeImports.eslint":!0}},TSX:{formatter:{language_server:{name:"eslint"}},code_actions_on_format:{"source.fixAll.eslint":!0,"source.organizeImports.eslint":!0}}}},Ye={languages:{JavaScript:{formatter:{language_server:{name:"oxfmt"}},code_actions_on_format:{"source.fixAll.oxc":!0,"source.organizeImports.oxc":!0}},TypeScript:{formatter:{language_server:{name:"oxfmt"}},code_actions_on_format:{"source.fixAll.oxc":!0,"source.organizeImports.oxc":!0}},TSX:{formatter:{language_server:{name:"oxfmt"}},code_actions_on_format:{"source.fixAll.oxc":!0,"source.organizeImports.oxc":!0}}},lsp:{oxlint:{initialization_options:{settings:{disableNestedConfig:!1,fixKind:"safe_fix",run:"onType",typeAware:!0,unusedDisableDirectives:"deny"}}},oxfmt:{initialization_options:{settings:{configPath:null,flags:{},"fmt.configPath":null,"fmt.experimental":!0,run:"onSave",typeAware:!1,unusedDisableDirectives:!1}}}}},Ze=(t="biome")=>{switch(t){case"biome":return L(a1,Qe);case"eslint":return L(a1,Ke);case"oxlint":return L(a1,Ye);default:return a1}},x=[{id:"vscode",name:"Visual Studio Code",subtitle:"The most popular code editor",description:"Microsoft's popular code editor with extensive extension support and built-in Git integration.",logo:xt,config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"cursor",name:"Cursor",subtitle:"The AI-first code editor",description:"The AI-first code editor built on VS Code with deep AI integration for coding assistance.",logo:s1,rules:{path:".cursor/rules/ultracite.mdc",header:`---
134
134
  description: Ultracite Rules - AI-Ready Formatter and Linter
135
135
  globs: "**/*.{ts,tsx,js,jsx,json,jsonc,html,vue,svelte,astro,css,yaml,yml,graphql,gql,md,mdx,grit}"
136
136
  alwaysApply: false
137
- ---`},hooks:{path:".cursor/hooks.json",getContent:t=>({version:1,hooks:{afterFileEdit:[{command:t}]}})},config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"windsurf",name:"Windsurf",subtitle:"The agentic IDE by Codeium",description:"Codeium's agentic IDE that combines AI assistance with a powerful VS Code-based development environment.",logo:xt,rules:{path:".windsurf/rules/ultracite.md"},hooks:{path:".windsurf/hooks.json",getContent:t=>({hooks:{post_write_code:[{command:t,show_output:!0}]}})},config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"antigravity",name:"Antigravity",subtitle:"Google's next-generation IDE",description:"An AI-powered development platform built on VS Code for building and deploying applications faster.",logo:mt,config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"kiro",name:"Kiro",subtitle:"AWS's spec-driven IDE",description:"AWS's spec-driven AI development environment for building production-ready applications.",logo:gt,rules:{path:".kiro/steering/ultracite.md"},config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"trae",name:"Trae AI",subtitle:"ByteDance's AI IDE",description:"ByteDance's AI-powered IDE built on VS Code - the real AI engineer.",logo:ut,rules:{path:".trae/rules/project_rules.md"},config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"void",name:"Void",subtitle:"Open-source AI editor",description:"An open-source AI code editor built on VS Code with a focus on privacy and extensibility.",logo:ht,config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"zed",name:"Zed",subtitle:"The high-performance editor",description:"A high-performance, multiplayer code editor built in Rust with built-in AI assistance.",logo:yt,rules:{path:".rules",appendMode:!0},config:{path:".zed/settings.json",getContent:Ke}}];var vt="./biome-TVLEY2T4.svg";var kt="./eslint-7IULJKW7.svg";var bt="./oxlint-5IE3ABOZ.svg";var zt="./prettier-O4V2FSEA.svg";var Ct="./stylelint-DEBSWZVS.svg";var L=[{id:"biome",name:"Biome",subtitle:"The modern all-in-one toolchain",description:"The modern, all-in-one toolchain. Biome is a fast formatter and linter written in Rust that handles JavaScript, TypeScript, JSON, CSS, and more with a single tool.",benefits:[{title:"Lightning fast",description:"Written in Rust, Biome can format a large codebase in milliseconds.",icon:"Zap"},{title:"All-in-one toolchain",description:"No more juggling ESLint, Prettier, and other tools. Biome handles formatting and linting in a single pass.",icon:"Layers"},{title:"287 preconfigured rules",description:"Covers accessibility, complexity, correctness, performance, security, style, and suspicious patterns.",icon:"ShieldCheck"},{title:"Multi-language support",description:"Natively supports JavaScript, TypeScript, JSX, TSX, JSON, JSONC, CSS, GraphQL, and HTML.",icon:"Code"},{title:"Smart sorting",description:"Automatically organizes imports and JSX attributes, plus sorts Tailwind CSS classes.",icon:"ArrowUpDown"},{title:"Zero dependencies",description:"Biome has no JavaScript dependencies. One binary does everything with consistent behavior.",icon:"Package"}],logo:vt,videos:["https://www.youtube.com/watch?v=lEkXbneUnWg","https://www.youtube.com/watch?v=b_F4LaycQcE"],configFiles:[{name:"biome.jsonc",lang:"json",code:t=>`{
137
+ ---`},hooks:{path:".cursor/hooks.json",getContent:t=>({version:1,hooks:{afterFileEdit:[{command:t}]}})},config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"windsurf",name:"Windsurf",subtitle:"The agentic IDE by Codeium",description:"Codeium's agentic IDE that combines AI assistance with a powerful VS Code-based development environment.",logo:vt,rules:{path:".windsurf/rules/ultracite.md"},hooks:{path:".windsurf/hooks.json",getContent:t=>({hooks:{post_write_code:[{command:t,show_output:!0}]}})},config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"antigravity",name:"Antigravity",subtitle:"Google's next-generation IDE",description:"An AI-powered development platform built on VS Code for building and deploying applications faster.",logo:gt,config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"kiro",name:"Kiro",subtitle:"AWS's spec-driven IDE",description:"AWS's spec-driven AI development environment for building production-ready applications.",logo:ht,rules:{path:".kiro/steering/ultracite.md"},config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"trae",name:"Trae AI",subtitle:"ByteDance's AI IDE",description:"ByteDance's AI-powered IDE built on VS Code - the real AI engineer.",logo:ut,rules:{path:".trae/rules/project_rules.md"},config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"void",name:"Void",subtitle:"Open-source AI editor",description:"An open-source AI code editor built on VS Code with a focus on privacy and extensibility.",logo:wt,config:{path:".vscode/settings.json",getContent:E,extensionCommand:"code --install-extension"}},{id:"zed",name:"Zed",subtitle:"The high-performance editor",description:"A high-performance, multiplayer code editor built in Rust with built-in AI assistance.",logo:yt,rules:{path:".rules",appendMode:!0},config:{path:".zed/settings.json",getContent:Ze}}];var kt="./biome-TVLEY2T4.svg";var bt="./eslint-7IULJKW7.svg";var zt="./oxlint-5IE3ABOZ.svg";var Ct="./prettier-O4V2FSEA.svg";var St="./stylelint-DEBSWZVS.svg";var U=[{id:"biome",name:"Biome",subtitle:"The modern all-in-one toolchain",description:"The modern, all-in-one toolchain. Biome is a fast formatter and linter written in Rust that handles JavaScript, TypeScript, JSON, CSS, and more with a single tool.",benefits:[{title:"Lightning fast",description:"Written in Rust, Biome can format a large codebase in milliseconds.",icon:"Zap"},{title:"All-in-one toolchain",description:"No more juggling ESLint, Prettier, and other tools. Biome handles formatting and linting in a single pass.",icon:"Layers"},{title:"287 preconfigured rules",description:"Covers accessibility, complexity, correctness, performance, security, style, and suspicious patterns.",icon:"ShieldCheck"},{title:"Multi-language support",description:"Natively supports JavaScript, TypeScript, JSX, TSX, JSON, JSONC, CSS, GraphQL, and HTML.",icon:"Code"},{title:"Smart sorting",description:"Automatically organizes imports and JSX attributes, plus sorts Tailwind CSS classes.",icon:"ArrowUpDown"},{title:"Zero dependencies",description:"Biome has no JavaScript dependencies. One binary does everything with consistent behavior.",icon:"Package"}],logo:kt,videos:["https://www.youtube.com/watch?v=lEkXbneUnWg","https://www.youtube.com/watch?v=b_F4LaycQcE"],configFiles:[{name:"biome.jsonc",lang:"json",code:t=>`{
138
138
  "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
139
139
  "extends": [
140
140
  ${t.map(e=>`"ultracite/biome/${e}"`).join(`,
141
141
  `)}
142
142
  ]
143
- }`}],vscodeExtensionId:"biomejs.biome"},{id:"eslint",name:"ESLint + Prettier + Stylelint",subtitle:"The most mature linting ecosystem",description:"The most mature and comprehensive linting solution. Combines ESLint for JavaScript/TypeScript, Prettier for formatting, and Stylelint for CSS with 20+ plugins and hundreds of preconfigured rules.",benefits:[{title:"Battle-tested",description:"Used by millions of developers worldwide. The largest ecosystem of plugins and configurations available.",icon:"ShieldCheck"},{title:"20+ plugins included",description:"React, TypeScript, JSX A11y, Import, Promise, Node, Next.js, Unicorn, SonarJS, and more preconfigured.",icon:"Puzzle"},{title:"Three tools in one",description:"ESLint handles code quality, Prettier ensures consistent formatting, and Stylelint keeps your CSS clean.",icon:"Layers"},{title:"Framework-aware",description:"First-class support for React, Next.js, Vue, Svelte, and more with framework-specific rules.",icon:"Box"},{title:"Type-aware linting",description:"Deep TypeScript integration with type-aware rules that catch bugs static analysis alone can't find.",icon:"FileCode"},{title:"Maximum coverage",description:"Hundreds of rules covering accessibility, security, performance, and best practices out of the box.",icon:"Target"}],includes:["ESLint","Prettier","Stylelint"],logo:kt,additionalLogos:[zt,Ct],configFiles:[{name:"eslint.config.mjs",lang:"javascript",code:t=>`import { defineConfig } from "eslint/config";
143
+ }`}],vscodeExtensionId:"biomejs.biome"},{id:"eslint",name:"ESLint + Prettier + Stylelint",subtitle:"The most mature linting ecosystem",description:"The most mature and comprehensive linting solution. Combines ESLint for JavaScript/TypeScript, Prettier for formatting, and Stylelint for CSS with 20+ plugins and hundreds of preconfigured rules.",benefits:[{title:"Battle-tested",description:"Used by millions of developers worldwide. The largest ecosystem of plugins and configurations available.",icon:"ShieldCheck"},{title:"20+ plugins included",description:"React, TypeScript, JSX A11y, Import, Promise, Node, Next.js, Unicorn, SonarJS, and more preconfigured.",icon:"Puzzle"},{title:"Three tools in one",description:"ESLint handles code quality, Prettier ensures consistent formatting, and Stylelint keeps your CSS clean.",icon:"Layers"},{title:"Framework-aware",description:"First-class support for React, Next.js, Vue, Svelte, and more with framework-specific rules.",icon:"Box"},{title:"Type-aware linting",description:"Deep TypeScript integration with type-aware rules that catch bugs static analysis alone can't find.",icon:"FileCode"},{title:"Maximum coverage",description:"Hundreds of rules covering accessibility, security, performance, and best practices out of the box.",icon:"Target"}],includes:["ESLint","Prettier","Stylelint"],logo:bt,additionalLogos:[Ct,St],configFiles:[{name:"eslint.config.mjs",lang:"javascript",code:t=>`import { defineConfig } from "eslint/config";
144
144
  ${t.map(e=>`import ${e} from "ultracite/eslint/${e}";`).join(`
145
145
  `)}
146
146
 
@@ -151,7 +151,7 @@ export default defineConfig([
151
151
  `)}
152
152
  ],
153
153
  },
154
- ]);`},{name:"prettier.config.mjs",lang:"javascript",code:()=>'export { default } from "ultracite/prettier";'},{name:"stylelint.config.mjs",lang:"javascript",code:()=>'export { default } from "ultracite/stylelint";'}],vscodeExtensionId:"dbaeumer.vscode-eslint"},{id:"oxlint",name:"Oxlint + Oxfmt",subtitle:"The fastest linter available",description:"The fastest linter available. Oxlint is part of the Oxc project, running 50-100x faster than ESLint with a focus on catching bugs and reducing false positives.",benefits:[{title:"50-100x faster",description:"Lint your entire codebase in milliseconds. No more waiting for slow linting processes.",icon:"Zap"},{title:"15 plugin equivalents",description:"Built-in support for React, TypeScript, Next.js, Vue, Jest, Vitest, JSDoc, and more without extra deps.",icon:"Puzzle"},{title:"Bug-focused rules",description:"Prioritizes catching real bugs over stylistic issues. High signal-to-noise ratio.",icon:"Bug"},{title:"Oxc ecosystem",description:"Part of the larger Oxc project with parser, resolver, transformer, and minifier built for speed.",icon:"Boxes"},{title:"Category-based config",description:"Rules organized into correctness, suspicious, pedantic, performance, restriction, and style categories.",icon:"FolderTree"},{title:"Drop-in ready",description:"Works alongside your existing ESLint setup or as a complete replacement with Oxfmt for formatting.",icon:"RefreshCw"}],includes:["Oxlint","Oxfmt"],logo:bt,configFiles:[{name:".oxlintrc.json",lang:"json",code:t=>`{
154
+ ]);`},{name:"prettier.config.mjs",lang:"javascript",code:()=>'export { default } from "ultracite/prettier";'},{name:"stylelint.config.mjs",lang:"javascript",code:()=>'export { default } from "ultracite/stylelint";'}],vscodeExtensionId:"dbaeumer.vscode-eslint"},{id:"oxlint",name:"Oxlint + Oxfmt",subtitle:"The fastest linter available",description:"The fastest linter available. Oxlint is part of the Oxc project, running 50-100x faster than ESLint with a focus on catching bugs and reducing false positives.",benefits:[{title:"50-100x faster",description:"Lint your entire codebase in milliseconds. No more waiting for slow linting processes.",icon:"Zap"},{title:"15 plugin equivalents",description:"Built-in support for React, TypeScript, Next.js, Vue, Jest, Vitest, JSDoc, and more without extra deps.",icon:"Puzzle"},{title:"Bug-focused rules",description:"Prioritizes catching real bugs over stylistic issues. High signal-to-noise ratio.",icon:"Bug"},{title:"Oxc ecosystem",description:"Part of the larger Oxc project with parser, resolver, transformer, and minifier built for speed.",icon:"Boxes"},{title:"Category-based config",description:"Rules organized into correctness, suspicious, pedantic, performance, restriction, and style categories.",icon:"FolderTree"},{title:"Drop-in ready",description:"Works alongside your existing ESLint setup or as a complete replacement with Oxfmt for formatting.",icon:"RefreshCw"}],includes:["Oxlint","Oxfmt"],logo:zt,configFiles:[{name:".oxlintrc.json",lang:"json",code:t=>`{
155
155
  "$schema": "./node_modules/oxlint/configuration_schema.json",
156
156
  "extends": [
157
157
  ${t.map(e=>`"./node_modules/ultracite/config/oxlint/${e}/.oxlintrc.json"`).join(`,
@@ -168,7 +168,7 @@ export default defineConfig([
168
168
  "arrowParens": "always",
169
169
  "proseWrap": "never",
170
170
  "printWidth": 80,
171
- }`}],vscodeExtensionId:"oxc.oxc-vscode"}];var o2=["react","next","solid","vue","svelte","qwik","remix","angular","astro"],i2=["husky","lefthook","lint-staged","pre-commit"],n2=["eslint","prettier"],y={linters:L.map(t=>t.id),editorConfigs:x.map(t=>t.id),agents:_.map(t=>t.id),integrations:i2,hooks:x.filter(t=>t.hooks).map(t=>t.id),frameworks:o2,migrations:n2};import{initTRPC as ho}from"@trpc/server";import{packageManagers as wo}from"nypm";import{createCli as xo}from"trpc-cli";import c from"zod";var k={name:"ultracite",description:"The AI-ready formatter that helps you write and generate code faster.",version:"7.0.7",type:"module",bin:{ultracite:"dist/index.js"},files:["config","dist/index.js","dist/index.d.ts","README.md"],scripts:{build:"tsup",test:"bun test","test:coverage":"bun test --coverage"},exports:{"./biome/*":"./config/biome/*/biome.jsonc","./eslint/*":"./config/eslint/*/eslint.config.mjs","./oxlint/*":"./config/oxlint/*/.oxlintrc.json","./prettier":"./config/prettier/prettier.config.mjs","./stylelint":"./config/stylelint/stylelint.config.mjs","./*":"./config/biome/*/biome.jsonc"},author:"Hayden Bleasel <hello@haydenbleasel.com>",bugs:{url:"https://github.com/haydenbleasel/ultracite/issues"},homepage:"https://www.ultracite.ai/",keywords:["ultracite","biome","linter","formatter","fixer"],license:"MIT",publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},repository:{type:"git",url:"git+https://github.com/haydenbleasel/ultracite.git"},devDependencies:{"@biomejs/biome":"2.3.11","@eslint/js":"^9.39.2","@next/eslint-plugin-next":"^16.1.1","@repo/data":"workspace:*","@tanstack/eslint-plugin-query":"^5.91.2","@types/node":"^25.0.3","@typescript-eslint/eslint-plugin":"^8.51.0","@typescript-eslint/parser":"^8.51.0","eslint-config-prettier":"^10.1.8","eslint-import-resolver-typescript":"^4.4.4","eslint-plugin-angular":"^5.0.0","eslint-plugin-astro":"^1.5.0","eslint-plugin-compat":"^6.0.2","eslint-plugin-cypress":"^5.2.0","eslint-plugin-github":"6.0.0","eslint-plugin-html":"^8.1.3","eslint-plugin-import":"^2.32.0","eslint-plugin-jest":"^29.12.0","eslint-plugin-jsx-a11y":"^6.10.2","eslint-plugin-n":"^17.23.1","eslint-plugin-prettier":"^5.5.4","eslint-plugin-promise":"^7.2.1","eslint-plugin-qwik":"^1.18.0","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^7.0.1","eslint-plugin-remix":"^1.1.1","eslint-plugin-solid":"^0.14.5","eslint-plugin-sonarjs":"^3.0.5","eslint-plugin-storybook":"^10.1.11","eslint-plugin-svelte":"^3.13.1","eslint-plugin-tailwindcss":"^3.18.2","eslint-plugin-unicorn":"^62.0.0","eslint-plugin-unused-imports":"^4.3.0","eslint-plugin-vue":"^10.6.2",globals:"^16.5.0","prettier-plugin-tailwindcss":"^0.7.2","stylelint-config-idiomatic-order":"^10.0.0","stylelint-config-standard":"^39.0.1","stylelint-prettier":"^5.0.3",tsup:"^8.5.1"},dependencies:{"@clack/prompts":"^0.11.0","@trpc/server":"^11.8.1",deepmerge:"^4.3.1",glob:"^13.0.0","jsonc-parser":"^3.3.1",nypm:"^0.6.2",oxlint:"^1.36.0","trpc-cli":"^0.12.1",zod:"^4.3.2"},packageManager:"bun@1.3.5"};p();import{spawnSync as D}from"child_process";import R from"process";import{detectPackageManager as N,dlxCommand as T}from"nypm";var h2=async(t,e,o)=>{let i=["check","--no-errors-on-unmatched"];e&&i.push(`--diagnostic-level=${e}`),o&&i.push("--error-on-warnings"),t.length>0?i.push(...h(t)):i.push("./");let s=(await N(R.cwd()))?.name||"npm",r=T(s,"@biomejs/biome",{args:i,short:s==="npm"}),a=D(r,{stdio:"inherit",shell:!0});if(a.error)throw new Error(`Failed to run Biome: ${a.error.message}`);return{hasErrors:a.status!==0}},w2=async t=>{let e=t.length>0?h(t):["."],i=(await N(R.cwd()))?.name||"npm",n=T(i,"eslint",{args:e,short:i==="npm"}),s=D(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run ESLint: ${s.error.message}`);return{hasErrors:s.status!==0}},x2=async t=>{let e=["--check",...t.length>0?h(t):["."]],i=(await N(R.cwd()))?.name||"npm",n=T(i,"prettier",{args:e,short:i==="npm"}),s=D(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run Prettier: ${s.error.message}`);return{hasErrors:s.status!==0}},y2=async t=>{let e=t.length>0?h(t):["."],i=(await N(R.cwd()))?.name||"npm",n=T(i,"stylelint",{args:e,short:i==="npm"}),s=D(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run Stylelint: ${s.error.message}`);return{hasErrors:s.status!==0}},v2=async(t,e,o)=>{let i=[];e&&i.push("--type-aware"),o&&i.push("--type-check"),i.push(...t.length>0?h(t):["."]);let s=(await N(R.cwd()))?.name||"npm",r=T(s,"oxlint",{args:i,short:s==="npm"}),a=D(r,{stdio:"inherit",shell:!0});if(a.error)throw new Error(`Failed to run Oxlint: ${a.error.message}`);return{hasErrors:a.status!==0}},k2=async(t,e)=>{let o=["--check"];e&&o.push("--no-error-on-unmatched-pattern"),o.push(...t.length>0?h(t):["."]);let n=(await N(R.cwd()))?.name||"npm",s=T(n,"oxfmt",{args:o,short:n==="npm"}),r=D(s,{stdio:"inherit",shell:!0});if(r.error)throw new Error(`Failed to run oxfmt: ${r.error.message}`);return{hasErrors:r.status!==0}},jt=async t=>{let e=t?.[0]||[],o=t?.[1]["diagnostic-level"],n=t?.[1].linter||await a1();if(!n)throw new Error("No linter configuration found. Run `ultracite init` to set up a linter.");switch(n){case"eslint":{let s=await x2(e),r=await w2(e),a=await y2(e);return{hasErrors:s.hasErrors||r.hasErrors||a.hasErrors}}case"oxlint":{let s=await k2(e,t?.[1]["no-error-on-unmatched-pattern"]),r=await v2(e,t?.[1]["type-aware"],t?.[1]["type-check"]);return{hasErrors:s.hasErrors||r.hasErrors}}default:return h2(e,o,t?.[1]["error-on-warnings"])}};import{spawnSync as P1}from"child_process";import{existsSync as A}from"fs";import{readFile as l1}from"fs/promises";import{join as O}from"path";import w from"process";import{intro as b2,log as c1,outro as j1,spinner as z2}from"@clack/prompts";import{parse as Pt}from"jsonc-parser";import{detectPackageManager as f1,dlxCommand as d1}from"nypm";var C2=[".prettierrc",".prettierrc.js",".prettierrc.cjs",".prettierrc.mjs",".prettierrc.json",".prettierrc.yaml",".prettierrc.yml","prettier.config.js","prettier.config.mjs","prettier.config.cjs"],S2=[".eslintrc",".eslintrc.js",".eslintrc.cjs",".eslintrc.mjs",".eslintrc.json",".eslintrc.yaml",".eslintrc.yml","eslint.config.js","eslint.config.mjs","eslint.config.cjs","eslint.config.ts","eslint.config.mts","eslint.config.cts"],j2=async()=>{let e=(await f1(w.cwd()))?.name||"npm",o=d1(e,"@biomejs/biome",{args:["--version"],short:e==="npm"}),i=P1(o,{shell:!0,encoding:"utf-8"});return i.status===0&&i.stdout?{name:"Biome installation",status:"pass",message:`Biome is installed (${i.stdout.trim()})`}:{name:"Biome installation",status:"fail",message:"Biome is not installed or not accessible"}},P2=async()=>{let e=(await f1(w.cwd()))?.name||"npm",o=d1(e,"eslint",{args:["--version"],short:e==="npm"}),i=P1(o,{shell:!0,encoding:"utf-8"});return i.status===0&&i.stdout?{name:"ESLint installation",status:"pass",message:`ESLint is installed (${i.stdout.trim()})`}:{name:"ESLint installation",status:"warn",message:"ESLint is not installed (optional)"}},E2=async()=>{let e=(await f1(w.cwd()))?.name||"npm",o=d1(e,"oxlint",{args:["--version"],short:e==="npm"}),i=P1(o,{shell:!0,encoding:"utf-8"});return i.status===0&&i.stdout?{name:"Oxlint installation",status:"pass",message:`Oxlint is installed (${i.stdout.trim()})`}:{name:"Oxlint installation",status:"warn",message:"Oxlint is not installed (optional)"}},A2=async()=>{let t=O(w.cwd(),"biome.json"),e=O(w.cwd(),"biome.jsonc"),o=null;if(A(t)?o=t:A(e)&&(o=e),!o)return{name:"Biome configuration",status:"warn",message:"No biome.json or biome.jsonc file found"};try{let i=await l1(o,"utf-8"),n=Pt(i);return Array.isArray(n?.extends)&&n.extends.includes("ultracite/biome/core")?{name:"Biome configuration",status:"pass",message:"biome.json(c) extends ultracite/biome/core"}:{name:"Biome configuration",status:"warn",message:"biome.json(c) exists but doesn't extend ultracite/biome/core"}}catch{return{name:"Biome configuration",status:"fail",message:"Could not parse biome.json(c) file"}}},O2=async()=>{let t=["eslint.config.mjs","eslint.config.js","eslint.config.cjs","eslint.config.ts","eslint.config.mts","eslint.config.cts"],e=null;for(let o of t){let i=O(w.cwd(),o);if(A(i)){e=i;break}}if(!e)return{name:"ESLint configuration",status:"warn",message:"No eslint.config.* file found (optional)"};try{return(await l1(e,"utf-8")).includes("ultracite/eslint")?{name:"ESLint configuration",status:"pass",message:"eslint.config.* imports ultracite/eslint"}:{name:"ESLint configuration",status:"warn",message:"eslint.config.* exists but doesn't import ultracite/eslint"}}catch{return{name:"ESLint configuration",status:"fail",message:"Could not read eslint.config.* file"}}},I2=t=>`./node_modules/ultracite/config/oxlint/${t}/.oxlintrc.json`,F2=async()=>{let t=O(w.cwd(),".oxlintrc.json");if(!A(t))return{name:"Oxlint configuration",status:"warn",message:"No .oxlintrc.json file found (optional)"};try{let e=await l1(t,"utf-8"),o=Pt(e);return Array.isArray(o?.extends)&&o.extends.includes(I2("core"))?{name:"Oxlint configuration",status:"pass",message:".oxlintrc.json extends ultracite oxlint config"}:{name:"Oxlint configuration",status:"warn",message:".oxlintrc.json exists but doesn't extend ultracite config"}}catch{return{name:"Oxlint configuration",status:"fail",message:"Could not parse .oxlintrc.json file"}}},B2=async()=>{let t=O(w.cwd(),"package.json");if(!A(t))return{name:"Ultracite dependency",status:"warn",message:"No package.json found"};try{let e=JSON.parse(await l1(t,"utf-8")),o=e.dependencies?.ultracite||e.devDependencies?.ultracite||e.peerDependencies?.ultracite;return o?{name:"Ultracite dependency",status:"pass",message:`Ultracite is in package.json (${o})`}:{name:"Ultracite dependency",status:"warn",message:"Ultracite not found in package.json dependencies"}}catch{return{name:"Ultracite dependency",status:"warn",message:"Could not parse package.json"}}},$2=()=>{let t=C2.some(i=>A(O(w.cwd(),i))),o=S2.filter(i=>!i.startsWith("eslint.config")).some(i=>A(O(w.cwd(),i)));if(t||o){let i=[];return t&&i.push("Prettier"),o&&i.push("ESLint (legacy config)"),{name:"Conflicting tools",status:"warn",message:`Found potentially conflicting tools: ${i.join(", ")}`}}return{name:"Conflicting tools",status:"pass",message:"No conflicting formatting/linting tools found"}},S=async(t,e)=>{let o=z2();o.start(`Checking ${e}...`);let i=await t();return i.status==="pass"||i.status,o.stop(i.message),i},Et=async()=>{b2(`Ultracite v${k.version} Doctor`);let e=(await f1(w.cwd()))?.name||"npm",o=d1(e,"ultracite",{args:["init"],short:e==="npm"}),i=[];i.push(await S(j2,"Biome installation")),i.push(await S(P2,"ESLint installation")),i.push(await S(E2,"Oxlint installation")),i.push(await S(A2,"Biome configuration")),i.push(await S(O2,"ESLint configuration")),i.push(await S(F2,"Oxlint configuration")),i.push(await S(B2,"Ultracite dependency")),i.push(await S($2,"conflicting tools"));let n=i.filter(a=>a.status==="pass").length,s=i.filter(a=>a.status==="fail").length,r=i.filter(a=>a.status==="warn").length;if(c1.info(`Summary: ${n} passed, ${r} warnings, ${s} failed`),s>0)throw c1.error(`Some checks failed. Run '${o}' to fix issues.`),j1("Doctor complete"),new Error("Doctor checks failed");if(r>0){c1.warn(`Some optional improvements available. Run '${o}' to configure.`),j1("Doctor complete");return}c1.success("Everything looks good!"),j1("Doctor complete")};p();import{spawnSync as G}from"child_process";import M from"process";import{detectPackageManager as J,dlxCommand as W}from"nypm";var _2=async(t,e,o)=>{let i=["check","--write","--no-errors-on-unmatched"];e&&i.push("--unsafe"),o&&i.push("--error-on-warnings"),t.length>0?i.push(...h(t)):i.push("./");let s=(await J(M.cwd()))?.name||"npm",r=W(s,"@biomejs/biome",{args:i,short:s==="npm"}),a=G(r,{stdio:"inherit",shell:!0});if(a.error)throw new Error(`Failed to run Biome: ${a.error.message}`);return{hasErrors:a.status!==0}},U2=async t=>{let e=["--fix",...t.length>0?h(t):["."]],i=(await J(M.cwd()))?.name||"npm",n=W(i,"eslint",{args:e,short:i==="npm"}),s=G(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run ESLint: ${s.error.message}`);return{hasErrors:s.status!==0}},L2=async t=>{let e=["--write",...t.length>0?h(t):["."]],i=(await J(M.cwd()))?.name||"npm",n=W(i,"prettier",{args:e,short:i==="npm"}),s=G(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run Prettier: ${s.error.message}`);return{hasErrors:s.status!==0}},D2=async t=>{let e=["--fix",...t.length>0?h(t):["."]],i=(await J(M.cwd()))?.name||"npm",n=W(i,"stylelint",{args:e,short:i==="npm"}),s=G(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run Stylelint: ${s.error.message}`);return{hasErrors:s.status!==0}},R2=async(t,e,o,i)=>{let n=[i?"--fix-dangerously":"--fix"];e&&n.push("--type-aware"),o&&n.push("--type-check"),n.push(...t.length>0?h(t):["."]);let r=(await J(M.cwd()))?.name||"npm",a=W(r,"oxlint",{args:n,short:r==="npm"}),d=G(a,{stdio:"inherit",shell:!0});if(d.error)throw new Error(`Failed to run Oxlint: ${d.error.message}`);return{hasErrors:d.status!==0}},N2=async t=>{let e=["--write",...t.length>0?h(t):["."]],i=(await J(M.cwd()))?.name||"npm",n=W(i,"oxfmt",{args:e,short:i==="npm"}),s=G(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run oxfmt: ${s.error.message}`);return{hasErrors:s.status!==0}},At=async(t,e={})=>{let o=e.linter||await a1();if(!o)throw new Error("No linter configuration found. Run `ultracite init` to set up a linter.");switch(o){case"eslint":{let i=await L2(t),n=await U2(t),s=await D2(t);return{hasErrors:i.hasErrors||n.hasErrors||s.hasErrors}}case"oxlint":{let i=await N2(t),n=await R2(t,e["type-aware"],e["type-check"],e.unsafe);return{hasErrors:i.hasErrors||n.hasErrors}}default:return _2(t,e.unsafe,e["error-on-warnings"])}};import Q3 from"process";import{cancel as Q,intro as K3,isCancel as K,log as b1,multiselect as e1,select as Y3,spinner as g}from"@clack/prompts";import{addDevDependency as Z3,detectPackageManager as q3}from"nypm";import{readFile as T2,writeFile as E1}from"fs/promises";var Ot=(t,e)=>`# Ultracite Code Standards
171
+ }`}],vscodeExtensionId:"oxc.oxc-vscode"}];var n2=["react","next","solid","vue","svelte","qwik","remix","angular","astro"],s2=["husky","lefthook","lint-staged","pre-commit"],r2=["eslint","prettier"],v={linters:U.map(t=>t.id),editorConfigs:x.map(t=>t.id),agents:_.map(t=>t.id),integrations:s2,hooks:x.filter(t=>t.hooks).map(t=>t.id),frameworks:n2,migrations:r2};import{initTRPC as wi}from"@trpc/server";import{packageManagers as xi}from"nypm";import{createCli as vi}from"trpc-cli";import c from"zod";var k={name:"ultracite",description:"The AI-ready formatter that helps you write and generate code faster.",version:"7.0.9",type:"module",bin:{ultracite:"dist/index.js"},files:["config","dist/index.js","dist/index.d.ts","README.md"],scripts:{build:"tsup",test:"bun test","test:coverage":"bun test --coverage"},exports:{"./biome/*":"./config/biome/*/biome.jsonc","./eslint/*":"./config/eslint/*/eslint.config.mjs","./oxlint/*":"./config/oxlint/*/.oxlintrc.json","./prettier":"./config/prettier/prettier.config.mjs","./stylelint":"./config/stylelint/stylelint.config.mjs","./*":"./config/biome/*/biome.jsonc"},author:"Hayden Bleasel <hello@haydenbleasel.com>",bugs:{url:"https://github.com/haydenbleasel/ultracite/issues"},homepage:"https://www.ultracite.ai/",keywords:["ultracite","biome","linter","formatter","fixer"],license:"MIT",publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},repository:{type:"git",url:"git+https://github.com/haydenbleasel/ultracite.git"},devDependencies:{"@biomejs/biome":"2.3.11","@eslint/js":"^9.39.2","@next/eslint-plugin-next":"^16.1.1","@repo/data":"workspace:*","@tanstack/eslint-plugin-query":"^5.91.2","@types/node":"^25.0.3","@typescript-eslint/eslint-plugin":"^8.51.0","@typescript-eslint/parser":"^8.51.0","eslint-config-prettier":"^10.1.8","eslint-import-resolver-typescript":"^4.4.4","eslint-plugin-angular":"^5.0.0","eslint-plugin-astro":"^1.5.0","eslint-plugin-compat":"^6.0.2","eslint-plugin-cypress":"^5.2.0","eslint-plugin-github":"6.0.0","eslint-plugin-html":"^8.1.3","eslint-plugin-import":"^2.32.0","eslint-plugin-jest":"^29.12.0","eslint-plugin-jsx-a11y":"^6.10.2","eslint-plugin-n":"^17.23.1","eslint-plugin-prettier":"^5.5.4","eslint-plugin-promise":"^7.2.1","eslint-plugin-qwik":"^1.18.0","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^7.0.1","eslint-plugin-remix":"^1.1.1","eslint-plugin-solid":"^0.14.5","eslint-plugin-sonarjs":"^3.0.5","eslint-plugin-storybook":"^10.1.11","eslint-plugin-svelte":"^3.13.1","eslint-plugin-tailwindcss":"^3.18.2","eslint-plugin-unicorn":"^62.0.0","eslint-plugin-unused-imports":"^4.3.0","eslint-plugin-vue":"^10.6.2",globals:"^16.5.0","prettier-plugin-tailwindcss":"^0.7.2","stylelint-config-idiomatic-order":"^10.0.0","stylelint-config-standard":"^39.0.1","stylelint-prettier":"^5.0.3",tsup:"^8.5.1"},dependencies:{"@clack/prompts":"^0.11.0","@trpc/server":"^11.8.1",deepmerge:"^4.3.1",glob:"^13.0.0","jsonc-parser":"^3.3.1",nypm:"^0.6.2",oxlint:"^1.36.0","trpc-cli":"^0.12.1",zod:"^4.3.2"},packageManager:"bun@1.3.5"};p();import{spawnSync as D}from"child_process";import R from"process";import{detectPackageManager as N,dlxCommand as T}from"nypm";var x2=async(t,e,i)=>{let o=["check","--no-errors-on-unmatched"];e&&o.push(`--diagnostic-level=${e}`),i&&o.push("--error-on-warnings"),t.length>0?o.push(...u(t)):o.push("./");let s=(await N(R.cwd()))?.name||"npm",r=T(s,"@biomejs/biome",{args:o,short:s==="npm"}),a=D(r,{stdio:"inherit",shell:!0});if(a.error)throw new Error(`Failed to run Biome: ${a.error.message}`);return{hasErrors:a.status!==0}},v2=async t=>{let e=t.length>0?u(t):["."],o=(await N(R.cwd()))?.name||"npm",n=T(o,"eslint",{args:e,short:o==="npm"}),s=D(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run ESLint: ${s.error.message}`);return{hasErrors:s.status!==0}},y2=async t=>{let e=["--check",...t.length>0?u(t):["."]],o=(await N(R.cwd()))?.name||"npm",n=T(o,"prettier",{args:e,short:o==="npm"}),s=D(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run Prettier: ${s.error.message}`);return{hasErrors:s.status!==0}},k2=async t=>{let e=t.length>0?u(t):["."],o=(await N(R.cwd()))?.name||"npm",n=T(o,"stylelint",{args:e,short:o==="npm"}),s=D(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run Stylelint: ${s.error.message}`);return{hasErrors:s.status!==0}},b2=async(t,e,i)=>{let o=[];e&&o.push("--type-aware"),i&&o.push("--type-check"),o.push(...t.length>0?u(t):["."]);let s=(await N(R.cwd()))?.name||"npm",r=T(s,"oxlint",{args:o,short:s==="npm"}),a=D(r,{stdio:"inherit",shell:!0});if(a.error)throw new Error(`Failed to run Oxlint: ${a.error.message}`);return{hasErrors:a.status!==0}},z2=async(t,e)=>{let i=["--check"];e&&i.push("--no-error-on-unmatched-pattern"),i.push(...t.length>0?u(t):["."]);let n=(await N(R.cwd()))?.name||"npm",s=T(n,"oxfmt",{args:i,short:n==="npm"}),r=D(s,{stdio:"inherit",shell:!0});if(r.error)throw new Error(`Failed to run oxfmt: ${r.error.message}`);return{hasErrors:r.status!==0}},Pt=async t=>{let e=t?.[0]||[],i=t?.[1]["diagnostic-level"],n=t?.[1].linter||await c1();if(!n)throw new Error("No linter configuration found. Run `ultracite init` to set up a linter.");switch(n){case"eslint":{let s=await y2(e),r=await v2(e),a=await k2(e);return{hasErrors:s.hasErrors||r.hasErrors||a.hasErrors}}case"oxlint":{let s=await z2(e,t?.[1]["no-error-on-unmatched-pattern"]),r=await b2(e,t?.[1]["type-aware"],t?.[1]["type-check"]);return{hasErrors:s.hasErrors||r.hasErrors}}default:return x2(e,i,t?.[1]["error-on-warnings"])}};import{spawnSync as E1}from"child_process";import{existsSync as A}from"fs";import{readFile as d1}from"fs/promises";import{join as O}from"path";import w from"process";import{intro as C2,log as l1,outro as P1,spinner as S2}from"@clack/prompts";import{parse as Et}from"jsonc-parser";import{detectPackageManager as f1,dlxCommand as m1}from"nypm";var j2=[".prettierrc",".prettierrc.js",".prettierrc.cjs",".prettierrc.mjs",".prettierrc.json",".prettierrc.yaml",".prettierrc.yml","prettier.config.js","prettier.config.mjs","prettier.config.cjs"],P2=[".eslintrc",".eslintrc.js",".eslintrc.cjs",".eslintrc.mjs",".eslintrc.json",".eslintrc.yaml",".eslintrc.yml","eslint.config.js","eslint.config.mjs","eslint.config.cjs","eslint.config.ts","eslint.config.mts","eslint.config.cts"],E2=async()=>{let e=(await f1(w.cwd()))?.name||"npm",i=m1(e,"@biomejs/biome",{args:["--version"],short:e==="npm"}),o=E1(i,{shell:!0,encoding:"utf-8"});return o.status===0&&o.stdout?{name:"Biome installation",status:"pass",message:`Biome is installed (${o.stdout.trim()})`}:{name:"Biome installation",status:"fail",message:"Biome is not installed or not accessible"}},A2=async()=>{let e=(await f1(w.cwd()))?.name||"npm",i=m1(e,"eslint",{args:["--version"],short:e==="npm"}),o=E1(i,{shell:!0,encoding:"utf-8"});return o.status===0&&o.stdout?{name:"ESLint installation",status:"pass",message:`ESLint is installed (${o.stdout.trim()})`}:{name:"ESLint installation",status:"warn",message:"ESLint is not installed (optional)"}},O2=async()=>{let e=(await f1(w.cwd()))?.name||"npm",i=m1(e,"oxlint",{args:["--version"],short:e==="npm"}),o=E1(i,{shell:!0,encoding:"utf-8"});return o.status===0&&o.stdout?{name:"Oxlint installation",status:"pass",message:`Oxlint is installed (${o.stdout.trim()})`}:{name:"Oxlint installation",status:"warn",message:"Oxlint is not installed (optional)"}},I2=async()=>{let t=O(w.cwd(),"biome.json"),e=O(w.cwd(),"biome.jsonc"),i=null;if(A(t)?i=t:A(e)&&(i=e),!i)return{name:"Biome configuration",status:"warn",message:"No biome.json or biome.jsonc file found"};try{let o=await d1(i,"utf-8"),n=Et(o);return Array.isArray(n?.extends)&&n.extends.includes("ultracite/biome/core")?{name:"Biome configuration",status:"pass",message:"biome.json(c) extends ultracite/biome/core"}:{name:"Biome configuration",status:"warn",message:"biome.json(c) exists but doesn't extend ultracite/biome/core"}}catch{return{name:"Biome configuration",status:"fail",message:"Could not parse biome.json(c) file"}}},F2=async()=>{let t=["eslint.config.mjs","eslint.config.js","eslint.config.cjs","eslint.config.ts","eslint.config.mts","eslint.config.cts"],e=null;for(let i of t){let o=O(w.cwd(),i);if(A(o)){e=o;break}}if(!e)return{name:"ESLint configuration",status:"warn",message:"No eslint.config.* file found (optional)"};try{return(await d1(e,"utf-8")).includes("ultracite/eslint")?{name:"ESLint configuration",status:"pass",message:"eslint.config.* imports ultracite/eslint"}:{name:"ESLint configuration",status:"warn",message:"eslint.config.* exists but doesn't import ultracite/eslint"}}catch{return{name:"ESLint configuration",status:"fail",message:"Could not read eslint.config.* file"}}},B2=t=>`./node_modules/ultracite/config/oxlint/${t}/.oxlintrc.json`,$2=async()=>{let t=O(w.cwd(),".oxlintrc.json");if(!A(t))return{name:"Oxlint configuration",status:"warn",message:"No .oxlintrc.json file found (optional)"};try{let e=await d1(t,"utf-8"),i=Et(e);return Array.isArray(i?.extends)&&i.extends.includes(B2("core"))?{name:"Oxlint configuration",status:"pass",message:".oxlintrc.json extends ultracite oxlint config"}:{name:"Oxlint configuration",status:"warn",message:".oxlintrc.json exists but doesn't extend ultracite config"}}catch{return{name:"Oxlint configuration",status:"fail",message:"Could not parse .oxlintrc.json file"}}},_2=async()=>{let t=O(w.cwd(),"package.json");if(!A(t))return{name:"Ultracite dependency",status:"warn",message:"No package.json found"};try{let e=JSON.parse(await d1(t,"utf-8")),i=e.dependencies?.ultracite||e.devDependencies?.ultracite||e.peerDependencies?.ultracite;return i?{name:"Ultracite dependency",status:"pass",message:`Ultracite is in package.json (${i})`}:{name:"Ultracite dependency",status:"warn",message:"Ultracite not found in package.json dependencies"}}catch{return{name:"Ultracite dependency",status:"warn",message:"Could not parse package.json"}}},L2=()=>{let t=j2.some(o=>A(O(w.cwd(),o))),i=P2.filter(o=>!o.startsWith("eslint.config")).some(o=>A(O(w.cwd(),o)));if(t||i){let o=[];return t&&o.push("Prettier"),i&&o.push("ESLint (legacy config)"),{name:"Conflicting tools",status:"warn",message:`Found potentially conflicting tools: ${o.join(", ")}`}}return{name:"Conflicting tools",status:"pass",message:"No conflicting formatting/linting tools found"}},S=async(t,e)=>{let i=S2();i.start(`Checking ${e}...`);let o=await t();return o.status==="pass"||o.status,i.stop(o.message),o},At=async()=>{C2(`Ultracite v${k.version} Doctor`);let e=(await f1(w.cwd()))?.name||"npm",i=m1(e,"ultracite",{args:["init"],short:e==="npm"}),o=[];o.push(await S(E2,"Biome installation")),o.push(await S(A2,"ESLint installation")),o.push(await S(O2,"Oxlint installation")),o.push(await S(I2,"Biome configuration")),o.push(await S(F2,"ESLint configuration")),o.push(await S($2,"Oxlint configuration")),o.push(await S(_2,"Ultracite dependency")),o.push(await S(L2,"conflicting tools"));let n=o.filter(a=>a.status==="pass").length,s=o.filter(a=>a.status==="fail").length,r=o.filter(a=>a.status==="warn").length;if(l1.info(`Summary: ${n} passed, ${r} warnings, ${s} failed`),s>0)throw l1.error(`Some checks failed. Run '${i}' to fix issues.`),P1("Doctor complete"),new Error("Doctor checks failed");if(r>0){l1.warn(`Some optional improvements available. Run '${i}' to configure.`),P1("Doctor complete");return}l1.success("Everything looks good!"),P1("Doctor complete")};p();import{spawnSync as G}from"child_process";import M from"process";import{detectPackageManager as J,dlxCommand as W}from"nypm";var U2=async(t,e,i)=>{let o=["check","--write","--no-errors-on-unmatched"];e&&o.push("--unsafe"),i&&o.push("--error-on-warnings"),t.length>0?o.push(...u(t)):o.push("./");let s=(await J(M.cwd()))?.name||"npm",r=W(s,"@biomejs/biome",{args:o,short:s==="npm"}),a=G(r,{stdio:"inherit",shell:!0});if(a.error)throw new Error(`Failed to run Biome: ${a.error.message}`);return{hasErrors:a.status!==0}},D2=async t=>{let e=["--fix",...t.length>0?u(t):["."]],o=(await J(M.cwd()))?.name||"npm",n=W(o,"eslint",{args:e,short:o==="npm"}),s=G(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run ESLint: ${s.error.message}`);return{hasErrors:s.status!==0}},R2=async t=>{let e=["--write",...t.length>0?u(t):["."]],o=(await J(M.cwd()))?.name||"npm",n=W(o,"prettier",{args:e,short:o==="npm"}),s=G(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run Prettier: ${s.error.message}`);return{hasErrors:s.status!==0}},N2=async t=>{let e=["--fix",...t.length>0?u(t):["."]],o=(await J(M.cwd()))?.name||"npm",n=W(o,"stylelint",{args:e,short:o==="npm"}),s=G(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run Stylelint: ${s.error.message}`);return{hasErrors:s.status!==0}},T2=async(t,e,i,o)=>{let n=[o?"--fix-dangerously":"--fix"];e&&n.push("--type-aware"),i&&n.push("--type-check"),n.push(...t.length>0?u(t):["."]);let r=(await J(M.cwd()))?.name||"npm",a=W(r,"oxlint",{args:n,short:r==="npm"}),f=G(a,{stdio:"inherit",shell:!0});if(f.error)throw new Error(`Failed to run Oxlint: ${f.error.message}`);return{hasErrors:f.status!==0}},G2=async t=>{let e=["--write",...t.length>0?u(t):["."]],o=(await J(M.cwd()))?.name||"npm",n=W(o,"oxfmt",{args:e,short:o==="npm"}),s=G(n,{stdio:"inherit",shell:!0});if(s.error)throw new Error(`Failed to run oxfmt: ${s.error.message}`);return{hasErrors:s.status!==0}},Ot=async(t,e={})=>{let i=e.linter||await c1();if(!i)throw new Error("No linter configuration found. Run `ultracite init` to set up a linter.");switch(i){case"eslint":{let o=await R2(t),n=await D2(t),s=await N2(t);return{hasErrors:o.hasErrors||n.hasErrors||s.hasErrors}}case"oxlint":{let o=await G2(t),n=await T2(t,e["type-aware"],e["type-check"],e.unsafe);return{hasErrors:o.hasErrors||n.hasErrors}}default:return U2(t,e.unsafe,e["error-on-warnings"])}};import Y3 from"process";import{cancel as Q,intro as Z3,isCancel as K,log as z1,multiselect as e1,select as q3,spinner as g}from"@clack/prompts";import{addDevDependency as ti,detectPackageManager as ei}from"nypm";import{readFile as M2,writeFile as A1}from"fs/promises";var It=(t,e)=>`# Ultracite Code Standards
172
172
 
173
173
  This project uses **Ultracite**, a zero-config preset that enforces strict code quality standards through automated formatting and linting.
174
174
 
@@ -291,23 +291,23 @@ ${e}'s linter will catch most issues automatically. Focus your attention on:
291
291
  ---
292
292
 
293
293
  Most formatting and common issues are automatically fixed by ${e}. Run \`${t} ultracite fix\` before committing to ensure compliance.
294
- `;p();import{dlxCommand as G2}from"nypm";var It=(t,e,o)=>{let i=_.find(d=>d.id===t);if(!i)throw new Error(`Agent "${t}" not found`);let n=L.find(d=>d.id===o);if(!n)throw new Error(`Provider "${o}" not found`);let s=G2(e,""),r=Ot(s,n.name),a=i.config.header?`${i.config.header}
294
+ `;p();import{dlxCommand as J2}from"nypm";var Ft=(t,e,i)=>{let o=_.find(f=>f.id===t);if(!o)throw new Error(`Agent "${t}" not found`);let n=U.find(f=>f.id===i);if(!n)throw new Error(`Provider "${i}" not found`);let s=J2(e,""),r=It(s,n.name),a=o.config.header?`${o.config.header}
295
295
 
296
- ${r}`:r;return{exists:()=>l(i.config.path),create:async()=>{await z(i.config.path),await E1(i.config.path,a)},update:async()=>{await z(i.config.path);let d=await l(i.config.path);if(!(i.config.appendMode&&d)){await E1(i.config.path,a);return}let m=await T2(i.config.path,"utf-8");m.includes(r.trim())||await E1(i.config.path,`${m}
296
+ ${r}`:r;return{exists:()=>l(o.config.path),create:async()=>{await z(o.config.path),await A1(o.config.path,a)},update:async()=>{await z(o.config.path);let f=await l(o.config.path);if(!(o.config.appendMode&&f)){await A1(o.config.path,a);return}let m=await M2(o.config.path,"utf-8");m.includes(r.trim())||await A1(o.config.path,`${m}
297
297
 
298
- ${r}`)}}};import{spawnSync as M2}from"child_process";import{readFile as J2,writeFile as A1}from"fs/promises";p();import W2 from"deepmerge";import{parse as H2}from"jsonc-parser";var Ft=(t,e="biome")=>{let o=x.find(n=>n.id===t);if(!o)throw new Error(`Editor "${t}" not found`);let i=o.config.getContent(e);return{exists:()=>l(o.config.path),create:async()=>{await z(o.config.path),await A1(o.config.path,JSON.stringify(i,null,2))},update:async()=>{if(await z(o.config.path),!await l(o.config.path)){await A1(o.config.path,JSON.stringify(i,null,2));return}let s=await J2(o.config.path,"utf-8"),a=H2(s)||{},d=W2(a,i);await A1(o.config.path,JSON.stringify(d,null,2))},extension:o.config.extensionCommand?n=>M2(`${o.config.extensionCommand} ${n}`,{stdio:"pipe",shell:!0}):void 0}};import{readFile as V2,writeFile as O1}from"fs/promises";p();import X2 from"deepmerge";import{dlxCommand as Q2}from"nypm";var Bt=(t,e)=>{let o=x.find(a=>a.id===t);if(!o)throw new Error(`Editor "${t}" not found`);if(!o.hooks)throw new Error(`Editor "${t}" does not support hooks`);let i=Q2(e,"ultracite",{args:["fix"],short:e==="npm"}),n=o.hooks.getContent(i),s=a=>JSON.stringify(a).includes("ultracite"),r=async()=>{if(!o.hooks?.path)throw new Error(`Editor "${t}" does not support hooks`);if(!await l(o.hooks.path)){await O1(o.hooks.path,JSON.stringify(n,null,2));return}let d=await V2(o.hooks.path,"utf-8"),m=JSON.parse(d);if(!s(m)){let v=X2(m,n);await O1(o.hooks.path,JSON.stringify(v,null,2))}};return{exists:()=>o.hooks?.path?l(o.hooks.path):!1,create:async()=>{if(!o.hooks?.path)throw new Error(`Editor "${t}" does not support hooks`);await z(o.hooks.path),await O1(o.hooks.path,JSON.stringify(n,null,2))},update:async()=>{if(!o.hooks?.path)throw new Error(`Editor "${t}" does not support hooks`);await z(o.hooks.path),await r()}}};F1();B1();L1();_1();p();import{readFile as z3,writeFile as Wt}from"fs/promises";import C3 from"deepmerge";import{parse as S3}from"jsonc-parser";var Ht={$schema:"./node_modules/@biomejs/biome/configuration_schema.json",extends:["ultracite/biome/core"]},N1=async()=>await l("./biome.json")?"./biome.json":"./biome.jsonc",g1={exists:async()=>{let t=await N1();return l(t)},create:async t=>{let e=await N1(),o=["ultracite/biome/core"];if(t?.frameworks&&t.frameworks.length>0)for(let n of t.frameworks)o.push(`ultracite/biome/${n}`);let i={...Ht,extends:o};return Wt(e,JSON.stringify(i,null,2))},update:async t=>{let e=await N1(),o=await z3(e,"utf-8"),n=S3(o)||{},r=[...n.extends&&Array.isArray(n.extends)?n.extends:[]];if(r.includes("ultracite/biome/core")||r.push("ultracite/biome/core"),t?.frameworks&&t.frameworks.length>0)for(let m of t.frameworks){let v=`ultracite/biome/${m}`;r.includes(v)||r.push(v)}n.extends=r;let a={$schema:Ht.$schema},d=C3(n,a);await Wt(e,JSON.stringify(d,null,2))}};p();import{writeFile as Vt}from"fs/promises";var j3=["./eslint.config.mjs","./eslint.config.js","./eslint.config.cjs","./eslint.config.ts","./eslint.config.mts","./eslint.config.cts"],Xt="./eslint.config.mjs",P3=async()=>{for(let t of j3)if(await l(t))return t;return null},Qt=t=>{let e=['import core from "ultracite/eslint/core";'],o=["...core"];if(t?.frameworks&&t.frameworks.length>0)for(let i of t.frameworks)e.push(`import ${i} from "ultracite/eslint/${i}";`),o.push(`...${i}`);return`${e.join(`
298
+ ${r}`)}}};import{spawnSync as W2}from"child_process";import{readFile as H2,writeFile as O1}from"fs/promises";p();import V2 from"deepmerge";import{parse as X2}from"jsonc-parser";var Bt=(t,e="biome")=>{let i=x.find(n=>n.id===t);if(!i)throw new Error(`Editor "${t}" not found`);let o=i.config.getContent(e);return{exists:()=>l(i.config.path),create:async()=>{await z(i.config.path),await O1(i.config.path,JSON.stringify(o,null,2))},update:async()=>{if(await z(i.config.path),!await l(i.config.path)){await O1(i.config.path,JSON.stringify(o,null,2));return}let s=await H2(i.config.path,"utf-8"),a=X2(s)||{},f=V2(a,o);await O1(i.config.path,JSON.stringify(f,null,2))},extension:i.config.extensionCommand?n=>W2(`${i.config.extensionCommand} ${n}`,{stdio:"pipe",shell:!0}):void 0}};import{readFile as Q2,writeFile as I1}from"fs/promises";p();import K2 from"deepmerge";import{dlxCommand as Y2}from"nypm";var $t=(t,e)=>{let i=x.find(a=>a.id===t);if(!i)throw new Error(`Editor "${t}" not found`);if(!i.hooks)throw new Error(`Editor "${t}" does not support hooks`);let o=Y2(e,"ultracite",{args:["fix"],short:e==="npm"}),n=i.hooks.getContent(o),s=a=>JSON.stringify(a).includes("ultracite"),r=async()=>{if(!i.hooks?.path)throw new Error(`Editor "${t}" does not support hooks`);if(!await l(i.hooks.path)){await I1(i.hooks.path,JSON.stringify(n,null,2));return}let f=await Q2(i.hooks.path,"utf-8"),m=JSON.parse(f);if(!s(m)){let y=K2(m,n);await I1(i.hooks.path,JSON.stringify(y,null,2))}};return{exists:()=>i.hooks?.path?l(i.hooks.path):!1,create:async()=>{if(!i.hooks?.path)throw new Error(`Editor "${t}" does not support hooks`);await z(i.hooks.path),await I1(i.hooks.path,JSON.stringify(n,null,2))},update:async()=>{if(!i.hooks?.path)throw new Error(`Editor "${t}" does not support hooks`);await z(i.hooks.path),await r()}}};B1();$1();D1();L1();p();import{readFile as S3,writeFile as Ht}from"fs/promises";import j3 from"deepmerge";import{parse as P3}from"jsonc-parser";var Vt={$schema:"./node_modules/@biomejs/biome/configuration_schema.json",extends:["ultracite/biome/core"]},T1=async()=>await l("./biome.json")?"./biome.json":"./biome.jsonc",h1={exists:async()=>{let t=await T1();return l(t)},create:async t=>{let e=await T1(),i=["ultracite/biome/core"];if(t?.frameworks&&t.frameworks.length>0)for(let n of t.frameworks)i.push(`ultracite/biome/${n}`);let o={...Vt,extends:i};return Ht(e,JSON.stringify(o,null,2))},update:async t=>{let e=await T1(),i=await S3(e,"utf-8"),n=P3(i)||{},r=[...n.extends&&Array.isArray(n.extends)?n.extends:[]];if(r.includes("ultracite/biome/core")||r.push("ultracite/biome/core"),t?.frameworks&&t.frameworks.length>0)for(let m of t.frameworks){let y=`ultracite/biome/${m}`;r.includes(y)||r.push(y)}n.extends=r;let a={$schema:Vt.$schema},f=j3(n,a);await Ht(e,JSON.stringify(f,null,2))}};p();import{writeFile as Xt}from"fs/promises";var E3=["./eslint.config.mjs","./eslint.config.js","./eslint.config.cjs","./eslint.config.ts","./eslint.config.mts","./eslint.config.cts"],Qt="./eslint.config.mjs",A3=async()=>{for(let t of E3)if(await l(t))return t;return null},Kt=t=>{let e=['import core from "ultracite/eslint/core";'],i=["...core"];if(t?.frameworks&&t.frameworks.length>0)for(let o of t.frameworks)e.push(`import ${o} from "ultracite/eslint/${o}";`),i.push(`...${o}`);return`${e.join(`
299
299
  `)}
300
300
 
301
301
  export default [
302
- ${o.join(`,
302
+ ${i.join(`,
303
303
  `)},
304
304
  ];
305
- `},u1={exists:async()=>await P3()!==null,create:async t=>{let e=Qt(t);await Vt(Xt,e)},update:async t=>{let e=Qt(t);await Vt(Xt,e)}};p();import{readFile as E3,writeFile as Kt}from"fs/promises";import A3 from"deepmerge";import{parse as O3}from"jsonc-parser";var h1="./.oxfmtrc.jsonc",Yt={$schema:"./node_modules/oxfmt/configuration_schema.json",printWidth:80,tabWidth:2,useTabs:!1,semi:!0,singleQuote:!1,quoteProps:"as-needed",jsxSingleQuote:!1,trailingComma:"es5",bracketSpacing:!0,bracketSameLine:!1,arrowParens:"always",endOfLine:"lf",experimentalSortPackageJson:!0,experimentalSortImports:{ignoreCase:!0,newlinesBetween:!0,order:"asc"}},w1={exists:async()=>await l(h1),create:async()=>{let t=`// Ultracite oxfmt Configuration
305
+ `},u1={exists:async()=>await A3()!==null,create:async t=>{let e=Kt(t);await Xt(Qt,e)},update:async t=>{let e=Kt(t);await Xt(Qt,e)}};p();import{readFile as O3,writeFile as Yt}from"fs/promises";import I3 from"deepmerge";import{parse as F3}from"jsonc-parser";var w1="./.oxfmtrc.jsonc",Zt={$schema:"./node_modules/oxfmt/configuration_schema.json",printWidth:80,tabWidth:2,useTabs:!1,semi:!0,singleQuote:!1,quoteProps:"as-needed",jsxSingleQuote:!1,trailingComma:"es5",bracketSpacing:!0,bracketSameLine:!1,arrowParens:"always",endOfLine:"lf",experimentalSortPackageJson:!0,experimentalSortImports:{ignoreCase:!0,newlinesBetween:!0,order:"asc"}},x1={exists:async()=>await l(w1),create:async()=>{let t=`// Ultracite oxfmt Configuration
306
306
  // https://oxc.rs/docs/guide/usage/formatter/config-file-reference.html
307
- ${JSON.stringify(Yt,null,2)}
308
- `;return await Kt(h1,t)},update:async()=>{let t=await E3(h1,"utf-8"),o=O3(t)||{},i=A3(o,Yt),n=`// Ultracite oxfmt Configuration
307
+ ${JSON.stringify(Zt,null,2)}
308
+ `;return await Yt(w1,t)},update:async()=>{let t=await O3(w1,"utf-8"),i=F3(t)||{},o=I3(i,Zt),n=`// Ultracite oxfmt Configuration
309
309
  // https://oxc.rs/docs/guide/usage/formatter/config-file-reference.html
310
- ${JSON.stringify(i,null,2)}
311
- `;await Kt(h1,n)}};p();import{readFile as I3,writeFile as Zt}from"fs/promises";import F3 from"deepmerge";import{parse as B3}from"jsonc-parser";var x1="./.oxlintrc.json",X=t=>`./node_modules/ultracite/config/oxlint/${t}/.oxlintrc.json`,qt={$schema:"./node_modules/oxlint/configuration_schema.json",extends:[X("core")]},y1={exists:async()=>await l(x1),create:async t=>{let e=[X("core")];if(t?.frameworks&&t.frameworks.length>0)for(let i of t.frameworks)e.push(X(i));let o={...qt,extends:e};return await Zt(x1,JSON.stringify(o,null,2))},update:async t=>{let e=await I3(x1,"utf-8"),i=B3(e)||{},n=i.extends&&Array.isArray(i.extends)?i.extends:[],s=m=>n.some(v=>v===X(m)),r=[...n];if(s("core")||r.push(X("core")),t?.frameworks&&t.frameworks.length>0)for(let m of t.frameworks)s(m)||r.push(X(m));i.extends=r;let a={$schema:qt.$schema},d=F3(i,a);await Zt(x1,JSON.stringify(d,null,2))}};p();import{readFile as $3,writeFile as te}from"fs/promises";var _3=["./.prettierrc.mjs","./prettier.config.mjs","./.prettierrc.mts","./prettier.config.mts","./.prettierrc.cjs","./prettier.config.cjs","./.prettierrc.cts","./prettier.config.cts","./.prettierrc.js","./prettier.config.js","./.prettierrc.ts","./prettier.config.ts","./.prettierrc","./.prettierrc.json","./.prettierrc.json5","./.prettierrc.yml","./.prettierrc.yaml","./.prettierrc.toml"],ee="./prettier.config.mjs",U3=async()=>{try{return"prettier"in JSON.parse(await $3("./package.json","utf-8"))}catch{return!1}},L3=async()=>{if(await U3())return"./package.json";for(let t of _3)if(await l(t))return t;return null},oe=()=>`export { default } from "ultracite/prettier";
312
- `,v1={exists:async()=>await L3()!==null,create:async()=>{let t=oe();await te(ee,t)},update:async()=>{let t=oe();await te(ee,t)}};p();import{readFile as D3,writeFile as ie}from"fs/promises";var R3=["./.stylelintrc.mjs","./stylelint.config.mjs","./.stylelintrc.cjs","./stylelint.config.cjs","./.stylelintrc.js","./stylelint.config.js","./.stylelintrc","./.stylelintrc.json","./.stylelintrc.yml","./.stylelintrc.yaml"],ne="./stylelint.config.mjs",N3=async()=>{try{return"stylelint"in JSON.parse(await D3("./package.json","utf-8"))}catch{return!1}},T3=async()=>{if(await N3())return"./package.json";for(let t of R3)if(await l(t))return t;return null},se=()=>`export { default } from "ultracite/stylelint";
313
- `,k1={exists:async()=>await T3()!==null,create:async()=>{let t=se();await ie(ne,t)},update:async()=>{let t=se();await ie(ne,t)}};import{readFile as G3,writeFile as re}from"fs/promises";import{glob as M3}from"glob";import{applyEdits as J3,modify as W3,parse as H3}from"jsonc-parser";var ae=async()=>{try{return await M3("**/tsconfig*.json",{ignore:["**/node_modules/**","**/dist/**","**/build/**","**/.next/**"],absolute:!1})}catch{return[]}},V3=t=>{if(!t)return!1;let e=t.compilerOptions;return e?e.strict===!0||e.strictNullChecks===!0:!1},X3=async t=>{try{let e=await G3(t,"utf-8"),o=H3(e);if(V3(o))return;if(o===void 0){await re(t,JSON.stringify({compilerOptions:{strictNullChecks:!0}},null,2));return}let n=W3(e,["compilerOptions","strictNullChecks"],!0,{formattingOptions:{tabSize:2,insertSpaces:!0}}),s=J3(e,n);await re(t,s)}catch(e){console.warn(`Failed to update ${t}:`,e)}},T1={exists:async()=>(await ae()).length>0,update:async()=>{let t=await ae();if(t.length===0){console.warn("No tsconfig.json files found in the project");return}await Promise.all(t.map(e=>X3(e)))}};p();var ce=k.devDependencies["@biomejs/biome"],G1=k.version,to=async(t,e="biome",o=!0,i=!1,n=!1)=>{let s=g();i||s.start("Installing dependencies...");let r=[`ultracite@${G1}`];if(e==="biome"&&r.push(`@biomejs/biome@${ce}`),e==="eslint"&&(r.push("eslint@latest"),r.push("prettier@latest"),r.push("stylelint@latest")),e==="oxlint"&&(r.push("oxlint@latest"),r.push("oxfmt@latest"),n&&r.push("oxlint-tsgolint@latest")),o)for(let a of r)await Z3(a,{packageManager:t,workspace:await C(),silent:!0});else{let a={ultracite:G1};e==="biome"&&(a["@biomejs/biome"]=ce),e==="eslint"&&(a.eslint="latest",a.prettier="latest",a.stylelint="latest"),e==="oxlint"&&(a.oxlint="latest",a.oxfmt="latest",n&&(a["oxlint-tsgolint"]="latest")),await b({devDependencies:a})}i||s.stop("Dependencies installed.")},eo=async(t=!1)=>{let e=g();if(t||e.start("Checking for tsconfig.json files..."),await T1.exists()){t||e.message("Found tsconfig.json files, updating with strictNullChecks..."),await T1.update(),t||e.stop("tsconfig.json files updated.");return}t||e.stop("No tsconfig.json files found, skipping.")},oo=async(t,e="biome",o=!1)=>{let i=x.find(r=>r.id===t);if(!i)throw new Error(`Editor "${t}" not found`);let n=Ft(t,e),s=g();if(o||s.start(`Checking for ${i.config.path}...`),await n.exists()){o||s.message(`${i.config.path} found, updating...`),await n.update(),o||s.stop(`${i.config.path} updated.`);return}if(o||s.message(`${i.config.path} not found, creating...`),await n.create(),n.extension){let r=L.find(a=>a.id===e)?.vscodeExtensionId;if(!r)throw new Error(`Linter extension not found for ${e}`);o||s.message(`Installing ${r} extension...`);try{if(n.extension(r).status===0){o||s.stop(`${i.config.path} created and ${r} extension installed.`);return}}catch{}o||s.stop(`${i.config.path} created. Install ${r} extension manually.`);return}o||(t==="zed"?s.stop(`${i.config.path} created. Install the Biome extension: https://biomejs.dev/reference/zed/`):s.stop(`${i.config.path} created.`))},io=async(t,e=!1)=>{let o=g();if(e||o.start("Checking for Biome configuration..."),await g1.exists()){e||o.message("Biome configuration found, updating..."),await g1.update({frameworks:t}),e||o.stop("Biome configuration updated.");return}e||o.message("Biome configuration not found, creating..."),await g1.create({frameworks:t}),e||o.stop("Biome configuration created.")},no=async(t,e=!1)=>{let o=g();if(e||o.start("Checking for ESLint configuration..."),await u1.exists()){e||o.message("ESLint configuration found, updating..."),await u1.update({frameworks:t}),e||o.stop("ESLint configuration updated.");return}e||o.message("ESLint configuration not found, creating..."),await u1.create({frameworks:t}),e||o.stop("ESLint configuration created.")},so=async(t,e=!1)=>{let o=g();if(e||o.start("Checking for Oxlint configuration..."),await y1.exists()){e||o.message("Oxlint configuration found, updating..."),await y1.update({frameworks:t}),e||o.stop("Oxlint configuration updated.");return}e||o.message("Oxlint configuration not found, creating..."),await y1.create({frameworks:t}),e||o.stop("Oxlint configuration created.")},ro=async(t=!1)=>{let e=g();if(t||e.start("Checking for Prettier configuration..."),await v1.exists()){t||e.message("Prettier configuration found, updating..."),await v1.update(),t||e.stop("Prettier configuration updated.");return}t||e.message("Prettier configuration not found, creating..."),await v1.create(),t||e.stop("Prettier configuration created.")},ao=async(t=!1)=>{let e=g();if(t||e.start("Checking for Stylelint configuration..."),await k1.exists()){t||e.message("Stylelint configuration found, updating..."),await k1.update(),t||e.stop("Stylelint configuration updated.");return}t||e.message("Stylelint configuration not found, creating..."),await k1.create(),t||e.stop("Stylelint configuration created.")},co=async(t=!1)=>{let e=g();if(t||e.start("Checking for oxfmt configuration..."),await w1.exists()){t||e.message("oxfmt configuration found, updating..."),await w1.update(),t||e.stop("oxfmt configuration updated.");return}t||e.message("oxfmt configuration not found, creating..."),await w1.create(),t||e.stop("oxfmt configuration created.")},lo=async(t,e=!0,o=!1)=>{let i=g();if(o||(i.start("Initializing pre-commit hooks..."),i.message("Installing Husky...")),e?await I.install(t):await b({devDependencies:{husky:"latest"},scripts:{prepare:"husky"}}),o||i.message("Initializing Husky..."),I.init(t),await I.exists()){o||i.message("Pre-commit hook found, updating..."),await I.update(t),o||i.stop("Pre-commit hook updated.");return}o||i.message("Pre-commit hook not found, creating..."),await I.create(t),o||i.stop("Pre-commit hook created.")},fo=async(t,e=!0,o=!1)=>{let i=g();if(o||(i.start("Initializing lefthook..."),i.message("Installing lefthook...")),e?await H.install(t):await b({devDependencies:{lefthook:"latest"}}),await H.exists()){o||i.message("lefthook.yml found, updating..."),await H.update(t),o||i.stop("lefthook.yml updated.");return}o||i.message("lefthook.yml not found, creating..."),await H.create(t),o||i.stop("lefthook.yml created.")},mo=async(t,e=!0,o=!1)=>{let i=g();if(o||(i.start("Initializing lint-staged..."),i.message("Installing lint-staged...")),e?await V.install(t):await b({devDependencies:{"lint-staged":"latest"}}),await V.exists()){o||i.message("lint-staged found, updating..."),await V.update(t),o||i.stop("lint-staged updated.");return}o||i.message("lint-staged not found, creating..."),await V.create(t),o||i.stop("lint-staged created.")},po=async(t,e=!1)=>{let o=g();if(e||o.start("Initializing pre-commit..."),await q.exists()){e||o.message(".pre-commit-config.yaml found, updating..."),await q.update(t),e||o.stop(".pre-commit-config.yaml updated.");return}e||o.message(".pre-commit-config.yaml not found, creating..."),await q.create(t),e||o.stop(".pre-commit-config.yaml created.")},go=async(t,e,o,i,n=!1)=>{let s=g();n||s.start(`Checking for ${e}...`);let r=It(t,o,i);if(await r.exists()){n||s.message(`${e} found, updating...`),await r.update(),n||s.stop(`${e} updated.`);return}n||s.message(`${e} not found, creating...`),await r.create(),n||s.stop(`${e} created.`)},uo=async(t,e,o,i=!1)=>{let n=g();i||n.start(`Checking for ${e} hooks...`);let s=Bt(t,o);if(await s.exists()){i||n.message(`${e} hooks found, updating...`),await s.update(),i||n.stop(`${e} hooks updated.`);return}i||n.message(`${e} hooks not found, creating...`),await s.create(),i||n.stop(`${e} hooks created.`)},le=async t=>{let e=t??{},o=e.quiet??!1;o||K3(`Ultracite v${G1} Initialization`);try{let{pm:i}=e;if(!i){let f=await q3(Q3.cwd());if(!f)throw new Error("No package manager specified or detected");if(!o&&f.warnings)for(let u of f.warnings)b1.warn(u);o||b1.info(`Detected lockfile, using ${f.name}`),i=f.name}let n=e.linter;if(n===void 0)if(o||e.pm||e.editors||e.agents||e.hooks||e.integrations!==void 0||e.frameworks!==void 0)n="biome";else{let u=await Y3({message:"Which linter do you want to use?",options:[{label:"Biome (Recommended)",value:"biome"},{label:"ESLint + Prettier + Stylelint",value:"eslint"},{label:"Oxlint + Oxfmt",value:"oxlint"}]});if(K(u)){Q("Operation cancelled.");return}n=u}let s=e.frameworks;if(s===void 0)if(o||e.pm||e.editors||e.agents||e.hooks||e.integrations!==void 0)s=[];else{let u=await e1({message:"Which frameworks are you using (optional)?",options:[{label:"React",value:"react"},{label:"Next.js",value:"next"},{label:"Solid",value:"solid"},{label:"Vue",value:"vue"},{label:"Svelte",value:"svelte"},{label:"Qwik",value:"qwik"},{label:"Angular",value:"angular"},{label:"Remix / TanStack Router / React Router",value:"remix"},{label:"Astro",value:"astro"}],required:!1});if(K(u)){Q("Operation cancelled.");return}s=u}let r=e.editors;if(!r)if(o)r=[];else{let f=await e1({message:"Which editors do you want to configure (recommended)?",options:[{label:"VSCode / Cursor / Windsurf",value:"vscode"},{label:"Zed",value:"zed"}],required:!1});if(K(f)){Q("Operation cancelled.");return}r=f}let a=e.agents,d=e.hooks,m=Object.fromEntries(_.map(f=>[f.id,f.name]));if(!a)if(o)a=[];else{let f=await e1({message:"Which agents do you want to enable (optional)?",options:Object.entries(m).map(([u,z1])=>({value:u,label:z1})),required:!1});if(K(f)){Q("Operation cancelled.");return}a=f}let v=Object.fromEntries(x.filter(f=>f.hooks).map(f=>[f.id,f.name]));if(!d)if(o)d=[];else{let f=await e1({message:"Which agent hooks do you want to enable (optional)?",options:Object.entries(v).map(([u,z1])=>({value:u,label:z1})),required:!1});if(K(f)){Q("Operation cancelled.");return}d=f}let P=e.integrations;if(P===void 0)if(o||e.pm||e.editors||e.agents||e.hooks)P=[];else{let u=await e1({message:"Would you like any of the following (optional)?",options:[{label:"Husky pre-commit hook",value:"husky"},{label:"Lefthook pre-commit hook",value:"lefthook"},{label:"Lint-staged",value:"lint-staged"},{label:"pre-commit (Python framework)",value:"pre-commit"}],required:!1});if(K(u)){Q("Operation cancelled.");return}P=u}await to(i,n,!e.skipInstall,o,n==="oxlint"&&e["type-aware"]),await eo(o),n==="biome"&&await io(s,o),n==="eslint"&&(await no(s,o),await ro(o),await ao(o)),n==="oxlint"&&(await so(s,o),await co(o));for(let f of r??[])await oo(f,n,o);for(let f of a??[])await go(f,m[f],i,n,o);for(let f of d??[])await uo(f,v[f],i,o);P?.includes("husky")&&await lo(i,!e.skipInstall,o),P?.includes("lefthook")&&await fo(i,!e.skipInstall,o),P?.includes("lint-staged")&&await mo(i,!e.skipInstall,o),P?.includes("pre-commit")&&await po(i,o),o||b1.success("Successfully initialized Ultracite configuration!")}catch(i){let n=i instanceof Error?i.message:"Unknown error";throw o||b1.error(`Failed to initialize Ultracite configuration: ${n}`),i}};var o1=ho.meta().create(),yo=o1.router({init:o1.procedure.meta({description:"Initialize Ultracite in the current directory"}).input(c.object({pm:c.enum(wo.map(t=>t.name)).optional().describe("Package manager to use"),linter:c.enum(y.linters).optional().describe("Linter / formatter to use"),editors:c.array(c.enum(y.editorConfigs)).optional().describe("Editors to configure"),agents:c.array(c.enum(y.agents)).optional().describe("Agents to enable"),hooks:c.array(c.enum(y.hooks)).optional().describe("Hooks to enable"),frameworks:c.array(c.enum(y.frameworks)).optional().describe("Frameworks being used"),integrations:c.array(c.enum(y.integrations)).optional().describe("Additional integrations to enable"),migrate:c.array(c.enum(y.migrations)).optional().describe("Migration tools to remove (e.g., eslint, prettier). Removes dependencies, config files, and editor settings."),"type-aware":c.boolean().optional().describe("enable type-aware linting (oxlint only, installs oxlint-tsgolint)"),skipInstall:c.boolean().default(!1).describe("Skip installing dependencies"),quiet:c.boolean().default(process.env.CI==="true"||process.env.CI==="1").describe("Suppress all interactive prompts and visual output. Automatically enabled in CI environments.")})).mutation(async({input:t})=>{await le(t)}),check:o1.procedure.meta({description:"Run linter without fixing files"}).input(c.tuple([c.array(c.string()).optional().default([]).describe("specific files to lint"),c.object({"diagnostic-level":c.enum(["info","warn","error"]).optional().describe("level of diagnostics to show. In order, from the lowest to the most important: info, warn, error."),linter:c.enum(y.linters).optional().describe("linter to use (biome, eslint, or oxlint)"),"type-aware":c.boolean().optional().describe("enable type-aware linting rules (oxlint only)"),"type-check":c.boolean().optional().describe("enable TypeScript compiler diagnostics (oxlint only)"),"no-error-on-unmatched-pattern":c.boolean().optional().describe("suppress errors when files don't match patterns (useful for hooks/CI)"),"error-on-warnings":c.boolean().optional().describe("treat warnings as errors (biome only)")})]).optional()).query(async({input:t})=>{await jt(t)}),fix:o1.procedure.meta({description:"Run linter and fix files"}).input(c.tuple([c.array(c.string()).optional().default([]).describe("specific files to format"),c.object({unsafe:c.boolean().optional().describe("apply unsafe fixes"),linter:c.enum(y.linters).optional().describe("linter to use (biome, eslint, or oxlint)"),"type-aware":c.boolean().optional().describe("enable type-aware linting rules (oxlint only)"),"type-check":c.boolean().optional().describe("enable TypeScript compiler diagnostics (oxlint only)"),"error-on-warnings":c.boolean().optional().describe("treat warnings as errors (biome only)")})]).optional()).mutation(async({input:t})=>{let[e,o]=t??[[],{}];await At(e,{unsafe:o.unsafe,linter:o.linter,"type-aware":o["type-aware"],"type-check":o["type-check"],"error-on-warnings":o["error-on-warnings"]})}),doctor:o1.procedure.meta({description:"Verify your Ultracite setup and check for issues"}).query(async()=>{await Et()})}),vo=xo({router:yo,name:k.name,version:k.version,description:k.description});process.env.TEST||vo.run();export{yo as router};
310
+ ${JSON.stringify(o,null,2)}
311
+ `;await Yt(w1,n)}};p();import{readFile as B3,writeFile as qt}from"fs/promises";import $3 from"deepmerge";import{parse as _3}from"jsonc-parser";var v1="./.oxlintrc.json",X=t=>`./node_modules/ultracite/config/oxlint/${t}/.oxlintrc.json`,te={$schema:"./node_modules/oxlint/configuration_schema.json",extends:[X("core")]},y1={exists:async()=>await l(v1),create:async t=>{let e=[X("core")];if(t?.frameworks&&t.frameworks.length>0)for(let o of t.frameworks)e.push(X(o));let i={...te,extends:e};return await qt(v1,JSON.stringify(i,null,2))},update:async t=>{let e=await B3(v1,"utf-8"),o=_3(e)||{},n=o.extends&&Array.isArray(o.extends)?o.extends:[],s=m=>n.some(y=>y===X(m)),r=[...n];if(s("core")||r.push(X("core")),t?.frameworks&&t.frameworks.length>0)for(let m of t.frameworks)s(m)||r.push(X(m));o.extends=r;let a={$schema:te.$schema},f=$3(o,a);await qt(v1,JSON.stringify(f,null,2))}};p();import{readFile as L3,writeFile as ee}from"fs/promises";var U3=["./.prettierrc.mjs","./prettier.config.mjs","./.prettierrc.mts","./prettier.config.mts","./.prettierrc.cjs","./prettier.config.cjs","./.prettierrc.cts","./prettier.config.cts","./.prettierrc.js","./prettier.config.js","./.prettierrc.ts","./prettier.config.ts","./.prettierrc","./.prettierrc.json","./.prettierrc.json5","./.prettierrc.yml","./.prettierrc.yaml","./.prettierrc.toml"],ie="./prettier.config.mjs",D3=async()=>{try{return"prettier"in JSON.parse(await L3("./package.json","utf-8"))}catch{return!1}},R3=async()=>{if(await D3())return"./package.json";for(let t of U3)if(await l(t))return t;return null},oe=()=>`export { default } from "ultracite/prettier";
312
+ `,k1={exists:async()=>await R3()!==null,create:async()=>{let t=oe();await ee(ie,t)},update:async()=>{let t=oe();await ee(ie,t)}};p();import{readFile as N3,writeFile as ne}from"fs/promises";var T3=["./.stylelintrc.mjs","./stylelint.config.mjs","./.stylelintrc.cjs","./stylelint.config.cjs","./.stylelintrc.js","./stylelint.config.js","./.stylelintrc","./.stylelintrc.json","./.stylelintrc.yml","./.stylelintrc.yaml"],se="./stylelint.config.mjs",G3=async()=>{try{return"stylelint"in JSON.parse(await N3("./package.json","utf-8"))}catch{return!1}},M3=async()=>{if(await G3())return"./package.json";for(let t of T3)if(await l(t))return t;return null},re=()=>`export { default } from "ultracite/stylelint";
313
+ `,b1={exists:async()=>await M3()!==null,create:async()=>{let t=re();await ne(se,t)},update:async()=>{let t=re();await ne(se,t)}};import{readFile as J3,writeFile as ae}from"fs/promises";import{glob as W3}from"glob";import{applyEdits as H3,modify as V3,parse as X3}from"jsonc-parser";var ce=async()=>{try{return await W3("**/tsconfig*.json",{ignore:["**/node_modules/**","**/dist/**","**/build/**","**/.next/**"],absolute:!1})}catch{return[]}},Q3=t=>{if(!t)return!1;let e=t.compilerOptions;return e?e.strict===!0||e.strictNullChecks===!0:!1},K3=async t=>{try{let e=await J3(t,"utf-8"),i=X3(e);if(Q3(i))return;if(i===void 0){await ae(t,JSON.stringify({compilerOptions:{strictNullChecks:!0}},null,2));return}let n=V3(e,["compilerOptions","strictNullChecks"],!0,{formattingOptions:{tabSize:2,insertSpaces:!0}}),s=H3(e,n);await ae(t,s)}catch(e){console.warn(`Failed to update ${t}:`,e)}},G1={exists:async()=>(await ce()).length>0,update:async()=>{let t=await ce();if(t.length===0){console.warn("No tsconfig.json files found in the project");return}await Promise.all(t.map(e=>K3(e)))}};p();var le=k.devDependencies["@biomejs/biome"],M1=k.version,ii=async(t,e="biome",i=!0,o=!1,n=!1)=>{let s=g();o||s.start("Installing dependencies...");let r=[`ultracite@${M1}`];if(e==="biome"&&r.push(`@biomejs/biome@${le}`),e==="eslint"&&(r.push("eslint@latest"),r.push("prettier@latest"),r.push("stylelint@latest")),e==="oxlint"&&(r.push("oxlint@latest"),r.push("oxfmt@latest"),n&&r.push("oxlint-tsgolint@latest")),i)for(let a of r)await ti(a,{packageManager:t,workspace:await C(),silent:!0});else{let a={ultracite:M1};e==="biome"&&(a["@biomejs/biome"]=le),e==="eslint"&&(a.eslint="latest",a.prettier="latest",a.stylelint="latest"),e==="oxlint"&&(a.oxlint="latest",a.oxfmt="latest",n&&(a["oxlint-tsgolint"]="latest")),await b({devDependencies:a})}o||s.stop("Dependencies installed.")},oi=async(t=!1)=>{let e=g();if(t||e.start("Checking for tsconfig.json files..."),await G1.exists()){t||e.message("Found tsconfig.json files, updating with strictNullChecks..."),await G1.update(),t||e.stop("tsconfig.json files updated.");return}t||e.stop("No tsconfig.json files found, skipping.")},ni=async(t,e="biome",i=!1)=>{let o=x.find(r=>r.id===t);if(!o)throw new Error(`Editor "${t}" not found`);let n=Bt(t,e),s=g();if(i||s.start(`Checking for ${o.config.path}...`),await n.exists()){i||s.message(`${o.config.path} found, updating...`),await n.update(),i||s.stop(`${o.config.path} updated.`);return}if(i||s.message(`${o.config.path} not found, creating...`),await n.create(),n.extension){let r=U.find(a=>a.id===e)?.vscodeExtensionId;if(!r)throw new Error(`Linter extension not found for ${e}`);i||s.message(`Installing ${r} extension...`);try{if(n.extension(r).status===0){i||s.stop(`${o.config.path} created and ${r} extension installed.`);return}}catch{}i||s.stop(`${o.config.path} created. Install ${r} extension manually.`);return}i||(t==="zed"?s.stop(`${o.config.path} created. Install the Biome extension: https://biomejs.dev/reference/zed/`):s.stop(`${o.config.path} created.`))},si=async(t,e=!1)=>{let i=g();if(e||i.start("Checking for Biome configuration..."),await h1.exists()){e||i.message("Biome configuration found, updating..."),await h1.update({frameworks:t}),e||i.stop("Biome configuration updated.");return}e||i.message("Biome configuration not found, creating..."),await h1.create({frameworks:t}),e||i.stop("Biome configuration created.")},ri=async(t,e=!1)=>{let i=g();if(e||i.start("Checking for ESLint configuration..."),await u1.exists()){e||i.message("ESLint configuration found, updating..."),await u1.update({frameworks:t}),e||i.stop("ESLint configuration updated.");return}e||i.message("ESLint configuration not found, creating..."),await u1.create({frameworks:t}),e||i.stop("ESLint configuration created.")},ai=async(t,e=!1)=>{let i=g();if(e||i.start("Checking for Oxlint configuration..."),await y1.exists()){e||i.message("Oxlint configuration found, updating..."),await y1.update({frameworks:t}),e||i.stop("Oxlint configuration updated.");return}e||i.message("Oxlint configuration not found, creating..."),await y1.create({frameworks:t}),e||i.stop("Oxlint configuration created.")},ci=async(t=!1)=>{let e=g();if(t||e.start("Checking for Prettier configuration..."),await k1.exists()){t||e.message("Prettier configuration found, updating..."),await k1.update(),t||e.stop("Prettier configuration updated.");return}t||e.message("Prettier configuration not found, creating..."),await k1.create(),t||e.stop("Prettier configuration created.")},li=async(t=!1)=>{let e=g();if(t||e.start("Checking for Stylelint configuration..."),await b1.exists()){t||e.message("Stylelint configuration found, updating..."),await b1.update(),t||e.stop("Stylelint configuration updated.");return}t||e.message("Stylelint configuration not found, creating..."),await b1.create(),t||e.stop("Stylelint configuration created.")},di=async(t=!1)=>{let e=g();if(t||e.start("Checking for oxfmt configuration..."),await x1.exists()){t||e.message("oxfmt configuration found, updating..."),await x1.update(),t||e.stop("oxfmt configuration updated.");return}t||e.message("oxfmt configuration not found, creating..."),await x1.create(),t||e.stop("oxfmt configuration created.")},fi=async(t,e=!0,i=!1)=>{let o=g();if(i||(o.start("Initializing pre-commit hooks..."),o.message("Installing Husky...")),e?await I.install(t):await b({devDependencies:{husky:"latest"},scripts:{prepare:"husky"}}),i||o.message("Initializing Husky..."),I.init(t),await I.exists()){i||o.message("Pre-commit hook found, updating..."),await I.update(t),i||o.stop("Pre-commit hook updated.");return}i||o.message("Pre-commit hook not found, creating..."),await I.create(t),i||o.stop("Pre-commit hook created.")},mi=async(t,e=!0,i=!1)=>{let o=g();if(i||(o.start("Initializing lefthook..."),o.message("Installing lefthook...")),e?await H.install(t):await b({devDependencies:{lefthook:"latest"}}),await H.exists()){i||o.message("lefthook.yml found, updating..."),await H.update(t),i||o.stop("lefthook.yml updated.");return}i||o.message("lefthook.yml not found, creating..."),await H.create(t),i||o.stop("lefthook.yml created.")},pi=async(t,e=!0,i=!1)=>{let o=g();if(i||(o.start("Initializing lint-staged..."),o.message("Installing lint-staged...")),e?await V.install(t):await b({devDependencies:{"lint-staged":"latest"}}),await V.exists()){i||o.message("lint-staged found, updating..."),await V.update(t),i||o.stop("lint-staged updated.");return}i||o.message("lint-staged not found, creating..."),await V.create(t),i||o.stop("lint-staged created.")},gi=async(t,e=!1)=>{let i=g();if(e||i.start("Initializing pre-commit..."),await q.exists()){e||i.message(".pre-commit-config.yaml found, updating..."),await q.update(t),e||i.stop(".pre-commit-config.yaml updated.");return}e||i.message(".pre-commit-config.yaml not found, creating..."),await q.create(t),e||i.stop(".pre-commit-config.yaml created.")},hi=async(t,e,i,o,n=!1)=>{let s=g();n||s.start(`Checking for ${e}...`);let r=Ft(t,i,o);if(await r.exists()){n||s.message(`${e} found, updating...`),await r.update(),n||s.stop(`${e} updated.`);return}n||s.message(`${e} not found, creating...`),await r.create(),n||s.stop(`${e} created.`)},ui=async(t,e,i,o=!1)=>{let n=g();o||n.start(`Checking for ${e} hooks...`);let s=$t(t,i);if(await s.exists()){o||n.message(`${e} hooks found, updating...`),await s.update(),o||n.stop(`${e} hooks updated.`);return}o||n.message(`${e} hooks not found, creating...`),await s.create(),o||n.stop(`${e} hooks created.`)},de=async t=>{let e=t??{},i=e.quiet??!1;i||Z3(`Ultracite v${M1} Initialization`);try{let{pm:o}=e;if(!o){let d=await ei(Y3.cwd());if(!d)throw new Error("No package manager specified or detected");if(!i&&d.warnings)for(let h of d.warnings)z1.warn(h);i||z1.info(`Detected lockfile, using ${d.name}`),o=d.name}let n=e.linter;if(n===void 0)if(i||e.pm||e.editors||e.agents||e.hooks||e.integrations!==void 0||e.frameworks!==void 0)n="biome";else{let h=await q3({message:"Which linter do you want to use?",options:[{label:"Biome (Recommended)",value:"biome"},{label:"ESLint + Prettier + Stylelint",value:"eslint"},{label:"Oxlint + Oxfmt",value:"oxlint"}]});if(K(h)){Q("Operation cancelled.");return}n=h}let s=e.frameworks;if(s===void 0)if(i||e.pm||e.editors||e.agents||e.hooks||e.integrations!==void 0)s=[];else{let h=await e1({message:"Which frameworks are you using (optional)?",options:[{label:"React",value:"react"},{label:"Next.js",value:"next"},{label:"Solid",value:"solid"},{label:"Vue",value:"vue"},{label:"Svelte",value:"svelte"},{label:"Qwik",value:"qwik"},{label:"Angular",value:"angular"},{label:"Remix / TanStack Router / React Router",value:"remix"},{label:"Astro",value:"astro"}],required:!1});if(K(h)){Q("Operation cancelled.");return}s=h}let r=e.editors;if(!r)if(i)r=[];else{let d=await e1({message:"Which editors do you want to configure (recommended)?",options:[{label:"VSCode / Cursor / Windsurf",value:"vscode"},{label:"Zed",value:"zed"}],required:!1});if(K(d)){Q("Operation cancelled.");return}r=d}let a=e.agents,f=e.hooks,m=Object.fromEntries(_.map(d=>[d.id,d.name]));if(!a)if(i)a=[];else{let d=await e1({message:"Which agents do you want to enable (optional)?",options:Object.entries(m).map(([h,C1])=>({value:h,label:C1})),required:!1});if(K(d)){Q("Operation cancelled.");return}a=d}let y=Object.fromEntries(x.filter(d=>d.hooks).map(d=>[d.id,d.name]));if(!f)if(i)f=[];else{let d=await e1({message:"Which agent hooks do you want to enable (optional)?",options:Object.entries(y).map(([h,C1])=>({value:h,label:C1})),required:!1});if(K(d)){Q("Operation cancelled.");return}f=d}let P=e.integrations;if(P===void 0)if(i||e.pm||e.editors||e.agents||e.hooks)P=[];else{let h=await e1({message:"Would you like any of the following (optional)?",options:[{label:"Husky pre-commit hook",value:"husky"},{label:"Lefthook pre-commit hook",value:"lefthook"},{label:"Lint-staged",value:"lint-staged"},{label:"pre-commit (Python framework)",value:"pre-commit"}],required:!1});if(K(h)){Q("Operation cancelled.");return}P=h}await ii(o,n,!e.skipInstall,i,n==="oxlint"&&e["type-aware"]),await oi(i),n==="biome"&&await si(s,i),n==="eslint"&&(await ri(s,i),await ci(i),await li(i)),n==="oxlint"&&(await ai(s,i),await di(i));for(let d of r??[])await ni(d,n,i);for(let d of a??[])await hi(d,m[d],o,n,i);for(let d of f??[])await ui(d,y[d],o,i);P?.includes("husky")&&await fi(o,!e.skipInstall,i),P?.includes("lefthook")&&await mi(o,!e.skipInstall,i),P?.includes("lint-staged")&&await pi(o,!e.skipInstall,i),P?.includes("pre-commit")&&await gi(o,i),i||z1.success("Successfully initialized Ultracite! Make sure to check out ultracite.ai/cloud for our pro version.")}catch(o){let n=o instanceof Error?o.message:"Unknown error";throw i||z1.error(`Failed to initialize Ultracite configuration: ${n}`),o}};var i1=wi.meta().create(),yi=i1.router({init:i1.procedure.meta({description:"Initialize Ultracite in the current directory"}).input(c.object({pm:c.enum(xi.map(t=>t.name)).optional().describe("Package manager to use"),linter:c.enum(v.linters).optional().describe("Linter / formatter to use"),editors:c.array(c.enum(v.editorConfigs)).optional().describe("Editors to configure"),agents:c.array(c.enum(v.agents)).optional().describe("Agents to enable"),hooks:c.array(c.enum(v.hooks)).optional().describe("Hooks to enable"),frameworks:c.array(c.enum(v.frameworks)).optional().describe("Frameworks being used"),integrations:c.array(c.enum(v.integrations)).optional().describe("Additional integrations to enable"),migrate:c.array(c.enum(v.migrations)).optional().describe("Migration tools to remove (e.g., eslint, prettier). Removes dependencies, config files, and editor settings."),"type-aware":c.boolean().optional().describe("enable type-aware linting (oxlint only, installs oxlint-tsgolint)"),skipInstall:c.boolean().default(!1).describe("Skip installing dependencies"),quiet:c.boolean().default(process.env.CI==="true"||process.env.CI==="1").describe("Suppress all interactive prompts and visual output. Automatically enabled in CI environments.")})).mutation(async({input:t})=>{await de(t)}),check:i1.procedure.meta({description:"Run linter without fixing files"}).input(c.tuple([c.array(c.string()).optional().default([]).describe("specific files to lint"),c.object({"diagnostic-level":c.enum(["info","warn","error"]).optional().describe("level of diagnostics to show. In order, from the lowest to the most important: info, warn, error."),linter:c.enum(v.linters).optional().describe("linter to use (biome, eslint, or oxlint)"),"type-aware":c.boolean().optional().describe("enable type-aware linting rules (oxlint only)"),"type-check":c.boolean().optional().describe("enable TypeScript compiler diagnostics (oxlint only)"),"no-error-on-unmatched-pattern":c.boolean().optional().describe("suppress errors when files don't match patterns (useful for hooks/CI)"),"error-on-warnings":c.boolean().optional().describe("treat warnings as errors (biome only)")})]).optional()).query(async({input:t})=>{await Pt(t)}),fix:i1.procedure.meta({description:"Run linter and fix files"}).input(c.tuple([c.array(c.string()).optional().default([]).describe("specific files to format"),c.object({unsafe:c.boolean().optional().describe("apply unsafe fixes"),linter:c.enum(v.linters).optional().describe("linter to use (biome, eslint, or oxlint)"),"type-aware":c.boolean().optional().describe("enable type-aware linting rules (oxlint only)"),"type-check":c.boolean().optional().describe("enable TypeScript compiler diagnostics (oxlint only)"),"error-on-warnings":c.boolean().optional().describe("treat warnings as errors (biome only)")})]).optional()).mutation(async({input:t})=>{let[e,i]=t??[[],{}];await Ot(e,{unsafe:i.unsafe,linter:i.linter,"type-aware":i["type-aware"],"type-check":i["type-check"],"error-on-warnings":i["error-on-warnings"]})}),doctor:i1.procedure.meta({description:"Verify your Ultracite setup and check for issues"}).query(async()=>{await At()})}),ki=vi({router:yi,name:k.name,version:k.version,description:k.description});process.env.TEST||ki.run();export{yi as router};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultracite",
3
3
  "description": "The AI-ready formatter that helps you write and generate code faster.",
4
- "version": "7.0.7",
4
+ "version": "7.0.9",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "ultracite": "dist/index.js"