ultracite 5.1.6 → 5.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var hs=Object.create;var se=Object.defineProperty;var ys=Object.getOwnPropertyDescriptor;var ws=Object.getOwnPropertyNames;var bs=Object.getPrototypeOf,vs=Object.prototype.hasOwnProperty;var tt=e=>t=>{var s=e[t];if(s)return s();throw new Error("Module not found in bundle: "+t)};var u=(e,t)=>()=>(e&&(t=e(e=0)),t);var p=(e,t)=>{for(var s in t)se(e,s,{get:t[s],enumerable:!0})},st=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ws(t))!vs.call(e,o)&&o!==s&&se(e,o,{get:()=>t[o],enumerable:!(n=ys(t,o))||n.enumerable});return e};var b=(e,t,s)=>(s=e!=null?hs(bs(e)):{},st(t||!e||!e.__esModule?se(s,"default",{value:e,enumerable:!0}):s,e)),d=e=>st(se({},"__esModule",{value:!0}),e);var x,ne=u(()=>{x={name:"ultracite",description:"The AI-ready formatter that helps you write and generate code faster.",version:"5.1.5",bin:{ultracite:"dist/index.js"},files:["biome.jsonc","dist"],scripts:{build:"tsup",test:"vitest run","test:coverage":"vitest --coverage"},main:"./biome.jsonc",author:"Hayden Bleasel <hello@haydenbleasel.com>",bugs:{url:"https://github.com/haydenbleasel/ultracite/issues"},homepage:"https://github.com/haydenbleasel/ultracite#readme",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:{"@auto-it/all-contributors":"^11.3.0","@auto-it/first-time-contributor":"^11.3.0","@biomejs/biome":"2.2.0","@types/node":"^24.0.14","@vitest/coverage-v8":"3.2.4",tsup:"^8.5.0"},dependencies:{"@clack/prompts":"^0.11.0",deepmerge:"^4.3.1","jsonc-parser":"^3.3.1","trpc-cli":"^0.10.0",vitest:"^3.2.4",zod:"^4.0.5"},packageManager:"pnpm@10.13.1"}});var it={};p(it,{format:()=>he});var nt,ot,he,ye=u(()=>{"use strict";nt=require("child_process"),ot=b(require("process")),he=(e,t={})=>{try{let s=e.length>0?e.map(o=>`"${o}"`).join(" "):"./",n=t.unsafe?" --unsafe":"";(0,nt.execSync)(`npx @biomejs/biome check --write${n} ${s}`,{stdio:"inherit"})}catch(s){let n=s instanceof Error?s.message:"Unknown error";console.error("Failed to run Ultracite:",n),ot.default.exit(1)}}});var at={};p(at,{exists:()=>i,isMonorepo:()=>T});var oe,rt,i,T,g=u(()=>{"use strict";oe=require("fs/promises"),rt=require("jsonc-parser"),i=async e=>{try{return await(0,oe.access)(e),!0}catch{return!1}},T=async()=>{if(await i("pnpm-workspace.yaml"))return!0;try{let e=(0,rt.parse)(await(0,oe.readFile)("package.json","utf-8"));return e?!!e.workspaces:!1}catch{return!1}}});var dt={};p(dt,{biome:()=>L});var W,lt,ut,xs,ct,we,L,be=u(()=>{"use strict";W=require("fs/promises"),lt=b(require("deepmerge")),ut=require("jsonc-parser");g();ne();xs=x.devDependencies["@biomejs/biome"],ct={$schema:`https://biomejs.dev/schemas/${xs}/schema.json`,extends:["ultracite"]},we=async()=>await i("./biome.json")?"./biome.json":"./biome.jsonc",L={exists:async()=>{let e=await we();return i(e)},create:async()=>{let e=await we();return(0,W.writeFile)(e,JSON.stringify(ct,null,2))},update:async()=>{let e=await we(),t=await(0,W.readFile)(e,"utf-8"),n=(0,ut.parse)(t)||{},o=n.extends&&Array.isArray(n.extends)?n.extends:[];o.includes("ultracite")||(n.extends=[...o,"ultracite"]);let r={$schema:ct.$schema},l=(0,lt.default)(n,r);await(0,W.writeFile)(e,JSON.stringify(l,null,2))}}});var pt,mt,ft,gt,ht,yt,wt,bt,yn,m,v=u(()=>{"use strict";pt=["Don't use `accessKey` attribute on any HTML element.",'Don\'t set `aria-hidden="true"` on focusable elements.',"Don't add ARIA roles, states, and properties to elements that don't support them.","Don't use distracting elements like `<marquee>` or `<blink>`.","Only use the `scope` prop on `<th>` elements.","Don't assign non-interactive ARIA roles to interactive HTML elements.","Make sure label elements have text content and are associated with an input.","Don't assign interactive ARIA roles to non-interactive HTML elements.","Don't assign `tabIndex` to non-interactive HTML elements.","Don't use positive integers for `tabIndex` property.",`Don't include "image", "picture", or "photo" in img alt prop.`,"Don't use explicit role property that's the same as the implicit/default role.","Make static elements with click handlers use a valid role attribute.","Always include a `title` element for SVG elements.","Give all elements requiring alt text meaningful information for screen readers.","Make sure anchors have content that's accessible to screen readers.","Assign `tabIndex` to non-interactive HTML elements with `aria-activedescendant`.","Include all required ARIA attributes for elements with ARIA roles.","Make sure ARIA properties are valid for the element's supported roles.","Always include a `type` attribute for button elements.","Make elements with interactive roles and handlers focusable.","Give heading elements content that's accessible to screen readers (not hidden with `aria-hidden`).","Always include a `lang` attribute on the html element.","Always include a `title` attribute for iframe elements.","Accompany `onClick` with at least one of: `onKeyUp`, `onKeyDown`, or `onKeyPress`.","Accompany `onMouseOver`/`onMouseOut` with `onFocus`/`onBlur`.","Include caption tracks for audio and video elements.","Use semantic elements instead of role attributes in JSX.","Make sure all anchors are valid and navigable.","Ensure all ARIA properties (`aria-*`) are valid.","Use valid, non-abstract ARIA roles for elements with ARIA roles.","Use valid ARIA state and property values.","Use valid values for the `autocomplete` attribute on input elements.","Use correct ISO language/country codes for the `lang` attribute."],mt=["Don't use consecutive spaces in regular expression literals.","Don't use the `arguments` object.","Don't use primitive type aliases or misleading types.","Don't use the comma operator.","Don't use empty type parameters in type aliases and interfaces.","Don't write functions that exceed a given Cognitive Complexity score.","Don't nest describe() blocks too deeply in test files.","Don't use unnecessary boolean casts.","Don't use unnecessary callbacks with flatMap.","Use for...of statements instead of Array.forEach.","Don't create classes that only have static members (like a static namespace).","Don't use this and super in static contexts.","Don't use unnecessary catch clauses.","Don't use unnecessary constructors.","Don't use unnecessary continue statements.","Don't export empty modules that don't change anything.","Don't use unnecessary escape sequences in regular expression literals.","Don't use unnecessary fragments.","Don't use unnecessary labels.","Don't use unnecessary nested block statements.","Don't rename imports, exports, and destructured assignments to the same name.","Don't use unnecessary string or template literal concatenation.","Don't use String.raw in template literals when there are no escape sequences.","Don't use useless case statements in switch statements.","Don't use ternary operators when simpler alternatives exist.","Don't use useless `this` aliasing.","Don't use any or unknown as type constraints.","Don't initialize variables to undefined.","Don't use the void operators (they're not familiar).","Use arrow functions instead of function expressions.","Use Date.now() to get milliseconds since the Unix Epoch.","Use .flatMap() instead of map().flat() when possible.","Use literal property access instead of computed property access.","Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.","Use concise optional chaining instead of chained logical expressions.","Use regular expression literals instead of the RegExp constructor when possible.","Don't use number literal object member names that aren't base 10 or use underscore separators.","Remove redundant terms from logical expressions.","Use while loops instead of for loops when you don't need initializer and update expressions.","Don't pass children as props.","Don't reassign const variables.","Don't use constant expressions in conditions.","Don't use `Math.min` and `Math.max` to clamp values when the result is constant.","Don't return a value from a constructor.","Don't use empty character classes in regular expression literals.","Don't use empty destructuring patterns.","Don't call global object properties as functions.","Don't declare functions and vars that are accessible outside their block.","Make sure builtins are correctly instantiated.","Don't use super() incorrectly inside classes. Also check that super() is called in classes that extend other constructors.","Don't use variables and function parameters before they're declared.","Don't use 8 and 9 escape sequences in string literals.","Don't use literal numbers that lose precision."],ft=["Don't use the return value of React.render.","Make sure all dependencies are correctly specified in React hooks.","Make sure all React hooks are called from the top level of component functions.","Don't forget key props in iterators and collection literals.","Don't destructure props inside JSX components in Solid projects.","Don't define React components inside other components.","Don't use event handlers on non-interactive elements.","Don't assign to React component props.","Don't use both `children` and `dangerouslySetInnerHTML` props on the same element.","Don't use dangerous JSX props.","Don't use Array index in keys.","Don't insert comments as text nodes.","Don't assign JSX properties multiple times.","Don't add extra closing tags for components without children.","Use `<>...</>` instead of `<Fragment>...</Fragment>`.",'Watch out for possible "wrong" semicolons inside JSX elements.'],gt=["Don't assign a value to itself.","Don't return a value from a setter.","Don't compare expressions that modify string case with non-compliant values.","Don't use lexical declarations in switch clauses.","Don't use variables that haven't been declared in the document.","Don't write unreachable code.","Make sure super() is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass.","Don't use control flow statements in finally blocks.","Don't use optional chaining where undefined values aren't allowed.","Don't have unused function parameters.","Don't have unused imports.","Don't have unused labels.","Don't have unused private class members.","Don't have unused variables.","Make sure void (self-closing) elements don't have children.","Don't return a value from a function with the return type 'void'","Use isNaN() when checking for NaN.",'Make sure "for" loop update clauses move the counter in the right direction.',"Make sure typeof expressions are compared to valid values.","Make sure generator functions contain yield.","Don't use await inside loops.","Don't use bitwise operators.","Don't use expressions where the operation doesn't change the value.","Make sure Promise-like statements are handled appropriately.","Don't use __dirname and __filename in the global scope.","Prevent import cycles.","Don't use configured elements.","Don't hardcode sensitive data like API keys and tokens.","Don't let variable declarations shadow variables from outer scopes.","Don't use the TypeScript directive @ts-ignore.","Prevent duplicate polyfills from Polyfill.io.","Don't use useless backreferences in regular expressions that always match empty strings.","Don't use unnecessary escapes in string literals.","Don't use useless undefined.","Make sure getters and setters for the same property are next to each other in class and object definitions.","Make sure object literals are declared consistently (defaults to explicit definitions).","Use static Response methods instead of new Response() constructor when possible.","Make sure switch-case statements are exhaustive.","Make sure the `preconnect` attribute is used when using Google Fonts.","Use `Array#{indexOf,lastIndexOf}()` instead of `Array#{findIndex,findLastIndex}()` when looking for the index of an item.","Make sure iterable callbacks return consistent values.",'Use `with { type: "json" }` for JSON module imports.',"Use numeric separators in numeric literals.","Use object spread instead of `Object.assign()` when constructing new objects.","Always use the radix argument when using `parseInt()`.","Make sure JSDoc comment lines start with a single asterisk, except for the first one.","Include a description parameter for `Symbol()`.","Don't use spread (`...`) syntax on accumulators.","Don't use the `delete` operator.","Don't access namespace imports dynamically.","Don't use namespace imports.","Declare regex literals at the top level.",'Don\'t use `target="_blank"` without `rel="noopener"`.'],ht=["Don't use TypeScript enums.","Don't export imported variables.","Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.","Don't use TypeScript namespaces.","Don't use non-null assertions with the `!` postfix operator.","Don't use parameter properties in class constructors.","Don't use user-defined types.","Use `as const` instead of literal types and type annotations.","Use either `T[]` or `Array<T>` consistently.","Initialize each enum member value explicitly.","Use `export type` for types.","Use `import type` for types.","Make sure all enum members are literal values.","Don't use TypeScript const enum.","Don't declare empty interfaces.","Don't let variables evolve into any type through reassignments.","Don't use the any type.","Don't misuse the non-null assertion operator (!) in TypeScript files.","Don't use implicit any type on variable declarations.","Don't merge interfaces and classes unsafely.","Don't use overload signatures that aren't next to each other.","Use the namespace keyword instead of the module keyword to declare TypeScript namespaces."],yt=["Don't use global `eval()`.","Don't use callbacks in asynchronous tests and hooks.","Don't use negation in `if` statements that have `else` clauses.","Don't use nested ternary expressions.","Don't reassign function parameters.","This rule lets you specify global variable names you don't want to use in your application.","Don't use specified modules when loaded by import or require.","Don't use constants whose value is the upper-case version of their name.","Use `String.slice()` instead of `String.substr()` and `String.substring()`.","Don't use template literals if you don't need interpolation or special-character handling.","Don't use `else` blocks when the `if` block breaks early.","Don't use yoda expressions.","Don't use Array constructors.","Use `at()` instead of integer index access.","Follow curly brace conventions.","Use `else if` instead of nested `if` statements in `else` clauses.","Use single `if` statements instead of nested `if` clauses.","Use `new` for all builtins except `String`, `Number`, and `Boolean`.","Use consistent accessibility modifiers on class properties and methods.","Use `const` declarations for variables that are only assigned once.","Put default function parameters and optional function parameters last.","Include a `default` clause in switch statements.","Use the `**` operator instead of `Math.pow`.","Use `for-of` loops when you need the index to extract an item from the iterated array.","Use `node:assert/strict` over `node:assert`.","Use the `node:` protocol for Node.js builtin modules.","Use Number properties instead of global ones.","Use assignment operator shorthand where possible.","Use function types instead of object types with call signatures.","Use template literals over string concatenation.","Use `new` when throwing an error.","Don't throw non-Error values.","Use `String.trimStart()` and `String.trimEnd()` over `String.trimLeft()` and `String.trimRight()`.","Use standard constants instead of approximated literals.","Don't assign values in expressions.","Don't use async functions as Promise executors.","Don't reassign exceptions in catch clauses.","Don't reassign class members.","Don't compare against -0.","Don't use labeled statements that aren't loops.","Don't use void type outside of generic or return types.","Don't use console.","Don't use control characters and escape sequences that match control characters in regular expression literals.","Don't use debugger.","Don't assign directly to document.cookie.","Use `===` and `!==`.","Don't use duplicate case labels.","Don't use duplicate class members.","Don't use duplicate conditions in if-else-if chains.","Don't use two keys with the same name inside objects.","Don't use duplicate function parameter names.","Don't have duplicate hooks in describe blocks.","Don't use empty block statements and static blocks.","Don't let switch clauses fall through.","Don't reassign function declarations.","Don't allow assignments to native objects and read-only global variables.","Use Number.isFinite instead of global isFinite.","Use Number.isNaN instead of global isNaN.","Don't assign to imported bindings.","Don't use irregular whitespace characters.","Don't use labels that share a name with a variable.","Don't use characters made with multiple code points in character class syntax.","Make sure to use new and constructor properly.","Don't use shorthand assign when the variable appears on both sides.","Don't use octal escape sequences in string literals.","Don't use Object.prototype builtins directly.","Don't redeclare variables, functions, classes, and types in the same scope.",`Don't have redundant "use strict".`,"Don't compare things where both sides are exactly the same.","Don't let identifiers shadow restricted names.","Don't use sparse arrays (arrays with holes).","Don't use template literal placeholder syntax in regular strings.","Don't use the then property.","Don't use unsafe negation.","Don't use var.","Don't use with statements in non-strict contexts.","Make sure async functions actually use await.","Make sure default clauses in switch statements come last.","Make sure to pass a message value when creating a built-in error.","Make sure get methods always return a value.","Use a recommended display strategy with Google Fonts.","Make sure for-in loops include an if statement.","Use Array.isArray() instead of instanceof Array.","Make sure to use the digits argument with Number#toFixed().",'Make sure to use the "use strict" directive in script files.'],wt=["Don't use `<img>` elements in Next.js projects.","Don't use `<head>` elements in Next.js projects.","Don't import next/document outside of pages/_document.jsx in Next.js projects.","Don't use the next/head module in pages/_document.js on Next.js projects."],bt=["Don't use export or module.exports in test files.","Don't use focused tests.","Make sure the assertion function, like expect, is placed inside an it() function call.","Don't use disabled tests."],yn=[...pt,...mt,...ft,...gt,...ht,...yt,...wt,...bt],m=`# Project Context
2
+ "use strict";var gs=Object.create;var se=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ys=Object.getOwnPropertyNames;var ws=Object.getPrototypeOf,bs=Object.prototype.hasOwnProperty;var tt=e=>t=>{var s=e[t];if(s)return s();throw new Error("Module not found in bundle: "+t)};var u=(e,t)=>()=>(e&&(t=e(e=0)),t);var p=(e,t)=>{for(var s in t)se(e,s,{get:t[s],enumerable:!0})},st=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ys(t))!bs.call(e,o)&&o!==s&&se(e,o,{get:()=>t[o],enumerable:!(n=hs(t,o))||n.enumerable});return e};var b=(e,t,s)=>(s=e!=null?gs(ws(e)):{},st(t||!e||!e.__esModule?se(s,"default",{value:e,enumerable:!0}):s,e)),d=e=>st(se({},"__esModule",{value:!0}),e);var x,ne=u(()=>{x={name:"ultracite",description:"The AI-ready formatter that helps you write and generate code faster.",version:"5.1.6",bin:{ultracite:"dist/index.js"},files:["biome.jsonc","dist"],scripts:{build:"tsup",test:"vitest run","test:coverage":"vitest --coverage"},main:"./biome.jsonc",author:"Hayden Bleasel <hello@haydenbleasel.com>",bugs:{url:"https://github.com/haydenbleasel/ultracite/issues"},homepage:"https://github.com/haydenbleasel/ultracite#readme",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:{"@auto-it/all-contributors":"^11.3.0","@auto-it/first-time-contributor":"^11.3.0","@biomejs/biome":"2.2.0","@types/node":"^24.0.14","@vitest/coverage-v8":"3.2.4",tsup:"^8.5.0"},dependencies:{"@clack/prompts":"^0.11.0",deepmerge:"^4.3.1","jsonc-parser":"^3.3.1","trpc-cli":"^0.10.0",vitest:"^3.2.4",zod:"^4.0.5"},packageManager:"pnpm@10.13.1"}});var it={};p(it,{format:()=>he});var nt,ot,he,ye=u(()=>{"use strict";nt=require("child_process"),ot=b(require("process")),he=(e,t={})=>{try{let s=e.length>0?e.map(o=>`"${o}"`).join(" "):"./",n=t.unsafe?" --unsafe":"";(0,nt.execSync)(`npx @biomejs/biome check --write${n} ${s}`,{stdio:"inherit"})}catch(s){let n=s instanceof Error?s.message:"Unknown error";console.error("Failed to run Ultracite:",n),ot.default.exit(1)}}});var at={};p(at,{exists:()=>i,isMonorepo:()=>W});var oe,rt,i,W,g=u(()=>{"use strict";oe=require("fs/promises"),rt=require("jsonc-parser"),i=async e=>{try{return await(0,oe.access)(e),!0}catch{return!1}},W=async()=>{if(await i("pnpm-workspace.yaml"))return!0;try{let e=(0,rt.parse)(await(0,oe.readFile)("package.json","utf-8"));return e?!!e.workspaces:!1}catch{return!1}}});var dt={};p(dt,{biome:()=>_});var L,lt,ut,ks,ct,we,_,be=u(()=>{"use strict";L=require("fs/promises"),lt=b(require("deepmerge")),ut=require("jsonc-parser");g();ne();ks=x.devDependencies["@biomejs/biome"],ct={$schema:`https://biomejs.dev/schemas/${ks}/schema.json`,extends:["ultracite"]},we=async()=>await i("./biome.json")?"./biome.json":"./biome.jsonc",_={exists:async()=>{let e=await we();return i(e)},create:async()=>{let e=await we();return(0,L.writeFile)(e,JSON.stringify(ct,null,2))},update:async()=>{let e=await we(),t=await(0,L.readFile)(e,"utf-8"),n=(0,ut.parse)(t)||{},o=n.extends&&Array.isArray(n.extends)?n.extends:[];o.includes("ultracite")||(n.extends=[...o,"ultracite"]);let r={$schema:ct.$schema},l=(0,lt.default)(n,r);await(0,L.writeFile)(e,JSON.stringify(l,null,2))}}});var pt,mt,ft,gt,ht,yt,wt,bt,hn,m,v=u(()=>{"use strict";pt=["Don't use `accessKey` attribute on any HTML element.",'Don\'t set `aria-hidden="true"` on focusable elements.',"Don't add ARIA roles, states, and properties to elements that don't support them.","Don't use distracting elements like `<marquee>` or `<blink>`.","Only use the `scope` prop on `<th>` elements.","Don't assign non-interactive ARIA roles to interactive HTML elements.","Make sure label elements have text content and are associated with an input.","Don't assign interactive ARIA roles to non-interactive HTML elements.","Don't assign `tabIndex` to non-interactive HTML elements.","Don't use positive integers for `tabIndex` property.",`Don't include "image", "picture", or "photo" in img alt prop.`,"Don't use explicit role property that's the same as the implicit/default role.","Make static elements with click handlers use a valid role attribute.","Always include a `title` element for SVG elements.","Give all elements requiring alt text meaningful information for screen readers.","Make sure anchors have content that's accessible to screen readers.","Assign `tabIndex` to non-interactive HTML elements with `aria-activedescendant`.","Include all required ARIA attributes for elements with ARIA roles.","Make sure ARIA properties are valid for the element's supported roles.","Always include a `type` attribute for button elements.","Make elements with interactive roles and handlers focusable.","Give heading elements content that's accessible to screen readers (not hidden with `aria-hidden`).","Always include a `lang` attribute on the html element.","Always include a `title` attribute for iframe elements.","Accompany `onClick` with at least one of: `onKeyUp`, `onKeyDown`, or `onKeyPress`.","Accompany `onMouseOver`/`onMouseOut` with `onFocus`/`onBlur`.","Include caption tracks for audio and video elements.","Use semantic elements instead of role attributes in JSX.","Make sure all anchors are valid and navigable.","Ensure all ARIA properties (`aria-*`) are valid.","Use valid, non-abstract ARIA roles for elements with ARIA roles.","Use valid ARIA state and property values.","Use valid values for the `autocomplete` attribute on input elements.","Use correct ISO language/country codes for the `lang` attribute."],mt=["Don't use consecutive spaces in regular expression literals.","Don't use the `arguments` object.","Don't use primitive type aliases or misleading types.","Don't use the comma operator.","Don't use empty type parameters in type aliases and interfaces.","Don't write functions that exceed a given Cognitive Complexity score.","Don't nest describe() blocks too deeply in test files.","Don't use unnecessary boolean casts.","Don't use unnecessary callbacks with flatMap.","Use for...of statements instead of Array.forEach.","Don't create classes that only have static members (like a static namespace).","Don't use this and super in static contexts.","Don't use unnecessary catch clauses.","Don't use unnecessary constructors.","Don't use unnecessary continue statements.","Don't export empty modules that don't change anything.","Don't use unnecessary escape sequences in regular expression literals.","Don't use unnecessary fragments.","Don't use unnecessary labels.","Don't use unnecessary nested block statements.","Don't rename imports, exports, and destructured assignments to the same name.","Don't use unnecessary string or template literal concatenation.","Don't use String.raw in template literals when there are no escape sequences.","Don't use useless case statements in switch statements.","Don't use ternary operators when simpler alternatives exist.","Don't use useless `this` aliasing.","Don't use any or unknown as type constraints.","Don't initialize variables to undefined.","Don't use the void operators (they're not familiar).","Use arrow functions instead of function expressions.","Use Date.now() to get milliseconds since the Unix Epoch.","Use .flatMap() instead of map().flat() when possible.","Use literal property access instead of computed property access.","Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.","Use concise optional chaining instead of chained logical expressions.","Use regular expression literals instead of the RegExp constructor when possible.","Don't use number literal object member names that aren't base 10 or use underscore separators.","Remove redundant terms from logical expressions.","Use while loops instead of for loops when you don't need initializer and update expressions.","Don't pass children as props.","Don't reassign const variables.","Don't use constant expressions in conditions.","Don't use `Math.min` and `Math.max` to clamp values when the result is constant.","Don't return a value from a constructor.","Don't use empty character classes in regular expression literals.","Don't use empty destructuring patterns.","Don't call global object properties as functions.","Don't declare functions and vars that are accessible outside their block.","Make sure builtins are correctly instantiated.","Don't use super() incorrectly inside classes. Also check that super() is called in classes that extend other constructors.","Don't use variables and function parameters before they're declared.","Don't use 8 and 9 escape sequences in string literals.","Don't use literal numbers that lose precision."],ft=["Don't use the return value of React.render.","Make sure all dependencies are correctly specified in React hooks.","Make sure all React hooks are called from the top level of component functions.","Don't forget key props in iterators and collection literals.","Don't destructure props inside JSX components in Solid projects.","Don't define React components inside other components.","Don't use event handlers on non-interactive elements.","Don't assign to React component props.","Don't use both `children` and `dangerouslySetInnerHTML` props on the same element.","Don't use dangerous JSX props.","Don't use Array index in keys.","Don't insert comments as text nodes.","Don't assign JSX properties multiple times.","Don't add extra closing tags for components without children.","Use `<>...</>` instead of `<Fragment>...</Fragment>`.",'Watch out for possible "wrong" semicolons inside JSX elements.'],gt=["Don't assign a value to itself.","Don't return a value from a setter.","Don't compare expressions that modify string case with non-compliant values.","Don't use lexical declarations in switch clauses.","Don't use variables that haven't been declared in the document.","Don't write unreachable code.","Make sure super() is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass.","Don't use control flow statements in finally blocks.","Don't use optional chaining where undefined values aren't allowed.","Don't have unused function parameters.","Don't have unused imports.","Don't have unused labels.","Don't have unused private class members.","Don't have unused variables.","Make sure void (self-closing) elements don't have children.","Don't return a value from a function with the return type 'void'","Use isNaN() when checking for NaN.",'Make sure "for" loop update clauses move the counter in the right direction.',"Make sure typeof expressions are compared to valid values.","Make sure generator functions contain yield.","Don't use await inside loops.","Don't use bitwise operators.","Don't use expressions where the operation doesn't change the value.","Make sure Promise-like statements are handled appropriately.","Don't use __dirname and __filename in the global scope.","Prevent import cycles.","Don't use configured elements.","Don't hardcode sensitive data like API keys and tokens.","Don't let variable declarations shadow variables from outer scopes.","Don't use the TypeScript directive @ts-ignore.","Prevent duplicate polyfills from Polyfill.io.","Don't use useless backreferences in regular expressions that always match empty strings.","Don't use unnecessary escapes in string literals.","Don't use useless undefined.","Make sure getters and setters for the same property are next to each other in class and object definitions.","Make sure object literals are declared consistently (defaults to explicit definitions).","Use static Response methods instead of new Response() constructor when possible.","Make sure switch-case statements are exhaustive.","Make sure the `preconnect` attribute is used when using Google Fonts.","Use `Array#{indexOf,lastIndexOf}()` instead of `Array#{findIndex,findLastIndex}()` when looking for the index of an item.","Make sure iterable callbacks return consistent values.",'Use `with { type: "json" }` for JSON module imports.',"Use numeric separators in numeric literals.","Use object spread instead of `Object.assign()` when constructing new objects.","Always use the radix argument when using `parseInt()`.","Make sure JSDoc comment lines start with a single asterisk, except for the first one.","Include a description parameter for `Symbol()`.","Don't use spread (`...`) syntax on accumulators.","Don't use the `delete` operator.","Don't access namespace imports dynamically.","Don't use namespace imports.","Declare regex literals at the top level.",'Don\'t use `target="_blank"` without `rel="noopener"`.'],ht=["Don't use TypeScript enums.","Don't export imported variables.","Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.","Don't use TypeScript namespaces.","Don't use non-null assertions with the `!` postfix operator.","Don't use parameter properties in class constructors.","Don't use user-defined types.","Use `as const` instead of literal types and type annotations.","Use either `T[]` or `Array<T>` consistently.","Initialize each enum member value explicitly.","Use `export type` for types.","Use `import type` for types.","Make sure all enum members are literal values.","Don't use TypeScript const enum.","Don't declare empty interfaces.","Don't let variables evolve into any type through reassignments.","Don't use the any type.","Don't misuse the non-null assertion operator (!) in TypeScript files.","Don't use implicit any type on variable declarations.","Don't merge interfaces and classes unsafely.","Don't use overload signatures that aren't next to each other.","Use the namespace keyword instead of the module keyword to declare TypeScript namespaces."],yt=["Don't use global `eval()`.","Don't use callbacks in asynchronous tests and hooks.","Don't use negation in `if` statements that have `else` clauses.","Don't use nested ternary expressions.","Don't reassign function parameters.","This rule lets you specify global variable names you don't want to use in your application.","Don't use specified modules when loaded by import or require.","Don't use constants whose value is the upper-case version of their name.","Use `String.slice()` instead of `String.substr()` and `String.substring()`.","Don't use template literals if you don't need interpolation or special-character handling.","Don't use `else` blocks when the `if` block breaks early.","Don't use yoda expressions.","Don't use Array constructors.","Use `at()` instead of integer index access.","Follow curly brace conventions.","Use `else if` instead of nested `if` statements in `else` clauses.","Use single `if` statements instead of nested `if` clauses.","Use `new` for all builtins except `String`, `Number`, and `Boolean`.","Use consistent accessibility modifiers on class properties and methods.","Use `const` declarations for variables that are only assigned once.","Put default function parameters and optional function parameters last.","Include a `default` clause in switch statements.","Use the `**` operator instead of `Math.pow`.","Use `for-of` loops when you need the index to extract an item from the iterated array.","Use `node:assert/strict` over `node:assert`.","Use the `node:` protocol for Node.js builtin modules.","Use Number properties instead of global ones.","Use assignment operator shorthand where possible.","Use function types instead of object types with call signatures.","Use template literals over string concatenation.","Use `new` when throwing an error.","Don't throw non-Error values.","Use `String.trimStart()` and `String.trimEnd()` over `String.trimLeft()` and `String.trimRight()`.","Use standard constants instead of approximated literals.","Don't assign values in expressions.","Don't use async functions as Promise executors.","Don't reassign exceptions in catch clauses.","Don't reassign class members.","Don't compare against -0.","Don't use labeled statements that aren't loops.","Don't use void type outside of generic or return types.","Don't use console.","Don't use control characters and escape sequences that match control characters in regular expression literals.","Don't use debugger.","Don't assign directly to document.cookie.","Use `===` and `!==`.","Don't use duplicate case labels.","Don't use duplicate class members.","Don't use duplicate conditions in if-else-if chains.","Don't use two keys with the same name inside objects.","Don't use duplicate function parameter names.","Don't have duplicate hooks in describe blocks.","Don't use empty block statements and static blocks.","Don't let switch clauses fall through.","Don't reassign function declarations.","Don't allow assignments to native objects and read-only global variables.","Use Number.isFinite instead of global isFinite.","Use Number.isNaN instead of global isNaN.","Don't assign to imported bindings.","Don't use irregular whitespace characters.","Don't use labels that share a name with a variable.","Don't use characters made with multiple code points in character class syntax.","Make sure to use new and constructor properly.","Don't use shorthand assign when the variable appears on both sides.","Don't use octal escape sequences in string literals.","Don't use Object.prototype builtins directly.","Don't redeclare variables, functions, classes, and types in the same scope.",`Don't have redundant "use strict".`,"Don't compare things where both sides are exactly the same.","Don't let identifiers shadow restricted names.","Don't use sparse arrays (arrays with holes).","Don't use template literal placeholder syntax in regular strings.","Don't use the then property.","Don't use unsafe negation.","Don't use var.","Don't use with statements in non-strict contexts.","Make sure async functions actually use await.","Make sure default clauses in switch statements come last.","Make sure to pass a message value when creating a built-in error.","Make sure get methods always return a value.","Use a recommended display strategy with Google Fonts.","Make sure for-in loops include an if statement.","Use Array.isArray() instead of instanceof Array.","Make sure to use the digits argument with Number#toFixed().",'Make sure to use the "use strict" directive in script files.'],wt=["Don't use `<img>` elements in Next.js projects.","Don't use `<head>` elements in Next.js projects.","Don't import next/document outside of pages/_document.jsx in Next.js projects.","Don't use the next/head module in pages/_document.js on Next.js projects."],bt=["Don't use export or module.exports in test files.","Don't use focused tests.","Make sure the assertion function, like expect, is placed inside an it() function call.","Don't use disabled tests."],hn=[...pt,...mt,...ft,...gt,...ht,...yt,...wt,...bt],m=`# Project Context
3
3
  Ultracite enforces strict type safety, accessibility standards, and consistent code quality for JavaScript/TypeScript projects using Biome's lightning-fast formatter and linter.
4
4
 
5
5
  ## Key Principles
@@ -70,14 +70,14 @@ try {
70
70
  } catch (e) {
71
71
  console.log(e);
72
72
  }
73
- \`\`\``});var vt={};p(vt,{claude:()=>_});var R,ve,_,ke=u(()=>{"use strict";R=require("fs/promises");v();g();ve="./.claude/CLAUDE.md",_={exists:()=>i(ve),create:async()=>{await(0,R.mkdir)(".claude",{recursive:!0}),await(0,R.writeFile)(ve,m)},update:async()=>{await(0,R.mkdir)(".claude",{recursive:!0}),await(0,R.writeFile)(ve,m)}}});var kt={};p(kt,{codex:()=>q});var De,xe,q,je=u(()=>{"use strict";De=require("fs/promises");v();g();xe="./AGENTS.md",q={exists:()=>i(xe),create:async()=>{await(0,De.writeFile)(xe,m)},update:async()=>{await(0,De.writeFile)(xe,m)}}});var xt={};p(xt,{cursor:()=>B});var P,Ce,Ds,B,Se=u(()=>{"use strict";P=require("fs/promises");v();g();Ce="./.cursor/rules/ultracite.mdc",Ds=`---
73
+ \`\`\``});var vt={};p(vt,{claude:()=>q});var P,ve,q,ke=u(()=>{"use strict";P=require("fs/promises");v();g();ve="./.claude/CLAUDE.md",q={exists:()=>i(ve),create:async()=>{await(0,P.mkdir)(".claude",{recursive:!0}),await(0,P.writeFile)(ve,m)},update:async()=>{await(0,P.mkdir)(".claude",{recursive:!0}),await(0,P.writeFile)(ve,m)}}});var kt={};p(kt,{codex:()=>B});var De,xe,B,je=u(()=>{"use strict";De=require("fs/promises");v();g();xe="./AGENTS.md",B={exists:()=>i(xe),create:async()=>{await(0,De.writeFile)(xe,m)},update:async()=>{await(0,De.writeFile)(xe,m)}}});var xt={};p(xt,{cursor:()=>H});var F,Ce,xs,H,Se=u(()=>{"use strict";F=require("fs/promises");v();g();Ce="./.cursor/rules/ultracite.mdc",xs=`---
74
74
  description: Ultracite Rules - AI-Ready Formatter and Linter
75
75
  globs: "**/*.{ts,tsx,js,jsx}"
76
76
  alwaysApply: true
77
77
  ---
78
78
 
79
- ${m}`,B={exists:()=>i(Ce),create:async()=>{await(0,P.mkdir)(".cursor/rules",{recursive:!0}),await(0,P.writeFile)(Ce,Ds)},update:async()=>{await(0,P.mkdir)(".cursor/rules",{recursive:!0}),await(0,P.writeFile)(Ce,m)}}});var Rt={};p(Rt,{eslintCleanup:()=>ie});var Dt,jt,H,Re,Ct,St,js,Cs,Ss,Rs,Ps,ie,Pe=u(()=>{"use strict";Dt=require("child_process"),jt=require("fs/promises"),H=require("fs/promises"),Re=require("jsonc-parser");g();Ct=[".eslintrc",".eslintrc.js",".eslintrc.json",".eslintrc.yml",".eslintrc.yaml",".eslintrc.config.js","eslint.config.js","eslint.config.mjs","eslint.config.cjs",".eslintignore"],St=async()=>{try{let e=await(0,H.readFile)("package.json","utf-8"),t=(0,Re.parse)(e);if(!t||typeof t!="object")return[];let s=t.dependencies||{},n=t.devDependencies||{},o={...s,...n};return Object.keys(o).filter(r=>r.startsWith("eslint")||r==="@eslint/js"||r==="@typescript-eslint/parser"||r==="@typescript-eslint/eslint-plugin")}catch{return[]}},js=(e,t)=>{if(t.length===0)return;let s=t.join(" ");try{(0,Dt.execSync)(`${e} ${s}`,{stdio:"pipe"})}catch{}},Cs=async()=>{let e=[];for(let t of Ct)if(await i(t))try{await(0,jt.unlink)(t),e.push(t)}catch{}return e},Ss=async()=>{let e="./.vscode/settings.json";if(!await i(e))return!1;try{let t=await(0,H.readFile)(e,"utf-8"),s=(0,Re.parse)(t);if(!s||typeof s!="object")return!1;let n=!1,o={...s},r=["eslint.enable","eslint.format.enable","eslint.validate","eslint.workingDirectories","eslint.codeAction.showDocumentation","eslint.run","eslint.autoFixOnSave","eslint.quiet","eslint.packageManager","eslint.options","eslint.trace.server"];for(let l of r)l in o&&(delete o[l],n=!0);if("editor.codeActionsOnSave"in o){let l=o["editor.codeActionsOnSave"];if(l&&typeof l=="object"){let a=["source.fixAll.eslint","source.organizeImports.eslint"];for(let f of a)f in l&&(delete l[f],n=!0);Object.keys(l).length===0&&delete o["editor.codeActionsOnSave"]}}return n?(await(0,H.writeFile)(e,JSON.stringify(o,null,2)),!0):!1}catch{return!1}},Rs=async()=>{if((await St()).length>0)return!0;for(let t of Ct)if(await i(t))return!0;return!1},Ps=e=>e.startsWith("npm")?"npm uninstall":e.startsWith("yarn")?"yarn remove":e.startsWith("pnpm")?"pnpm remove":e.startsWith("bun")?"bun remove":"npm uninstall",ie={hasESLint:Rs,remove:async e=>{let t=await St(),s=Ps(e);js(s,t);let n=await Cs(),o=await Ss();return{packagesRemoved:t,filesRemoved:n,vsCodeCleaned:o}}}});var At={};p(At,{husky:()=>F});var Ft,D,Pt,re,F,Fe=u(()=>{"use strict";Ft=require("child_process"),D=require("fs/promises");g();Pt="npx ultracite format",re="./.husky/pre-commit",F={exists:()=>i(re),install:e=>{(0,Ft.execSync)(`${e} -D husky`)},create:async()=>{await(0,D.mkdir)(".husky",{recursive:!0}),await(0,D.writeFile)(re,Pt)},update:async()=>{let e=await(0,D.readFile)(re,"utf-8");await(0,D.writeFile)(re,`${e}
80
- ${Pt}`)}}});var It={};p(It,{kiro:()=>$t});var A,Ae,$t,$e=u(()=>{"use strict";A=require("fs/promises");v();g();Ae="./.kiro/steering/linting-and-formatting.md",$t={exists:()=>i(Ae),create:async()=>{await(0,A.mkdir)(".kiro/steering",{recursive:!0}),await(0,A.writeFile)(Ae,m)},update:async()=>{await(0,A.mkdir)(".kiro/steering",{recursive:!0}),await(0,A.writeFile)(Ae,m)}}});var Ut={};p(Ut,{lefthook:()=>I});var Ie,j,ae,$,Ot,I,Oe=u(()=>{"use strict";Ie=require("child_process"),j=require("fs/promises");g();ae="npx ultracite format",$="./lefthook.yml",Ot=`pre-commit:
79
+ ${m}`,H={exists:()=>i(Ce),create:async()=>{await(0,F.mkdir)(".cursor/rules",{recursive:!0}),await(0,F.writeFile)(Ce,xs)},update:async()=>{await(0,F.mkdir)(".cursor/rules",{recursive:!0}),await(0,F.writeFile)(Ce,m)}}});var St={};p(St,{eslintCleanup:()=>ie});var Dt,D,Re,jt,Ct,Ds,js,Cs,Ss,Rs,ie,Pe=u(()=>{"use strict";Dt=require("child_process"),D=require("fs/promises"),Re=require("jsonc-parser");g();jt=[".eslintrc",".eslintrc.js",".eslintrc.json",".eslintrc.yml",".eslintrc.yaml",".eslintrc.config.js","eslint.config.js","eslint.config.mjs","eslint.config.cjs",".eslintignore"],Ct=async()=>{try{let e=await(0,D.readFile)("package.json","utf-8"),t=(0,Re.parse)(e);if(!t||typeof t!="object")return[];let s=t.dependencies||{},n=t.devDependencies||{},o={...s,...n};return Object.keys(o).filter(r=>r.startsWith("eslint")||r.startsWith("@eslint/")||r==="@typescript-eslint/parser"||r==="@typescript-eslint/eslint-plugin")}catch{return[]}},Ds=(e,t)=>{if(t.length===0)return;let s=t.join(" ");try{(0,Dt.execSync)(`${e} ${s}`,{stdio:"pipe"})}catch{}},js=async()=>{let e=[];for(let t of jt)if(await i(t))try{await(0,D.unlink)(t),e.push(t)}catch{}return e},Cs=async()=>{let e="./.vscode/settings.json";if(!await i(e))return!1;try{let t=await(0,D.readFile)(e,"utf-8"),s=(0,Re.parse)(t);if(!s||typeof s!="object")return!1;let n=!1,o={...s},r=["eslint.enable","eslint.format.enable","eslint.validate","eslint.workingDirectories","eslint.codeAction.showDocumentation","eslint.run","eslint.autoFixOnSave","eslint.quiet","eslint.packageManager","eslint.options","eslint.trace.server"];for(let l of r)l in o&&(delete o[l],n=!0);if("editor.codeActionsOnSave"in o){let l=o["editor.codeActionsOnSave"];if(l&&typeof l=="object"){let a=["source.fixAll.eslint","source.organizeImports.eslint"];for(let f of a)f in l&&(delete l[f],n=!0);Object.keys(l).length===0&&delete o["editor.codeActionsOnSave"]}}return n?(await(0,D.writeFile)(e,JSON.stringify(o,null,2)),!0):!1}catch{return!1}},Ss=async()=>{if((await Ct()).length>0)return!0;for(let t of jt)if(await i(t))return!0;return!1},Rs=e=>e.startsWith("npm")?"npm uninstall":e.startsWith("yarn")?"yarn remove":e.startsWith("pnpm")?"pnpm remove":e.startsWith("bun")?"bun remove":"npm uninstall",ie={hasESLint:Ss,remove:async e=>{let t=await Ct(),s=Rs(e);Ds(s,t);let n=await js(),o=await Cs();return{packagesRemoved:t,filesRemoved:n,vsCodeCleaned:o}}}});var Ft={};p(Ft,{husky:()=>A});var Pt,j,Rt,re,A,Fe=u(()=>{"use strict";Pt=require("child_process"),j=require("fs/promises");g();Rt="npx ultracite format",re="./.husky/pre-commit",A={exists:()=>i(re),install:e=>{(0,Pt.execSync)(`${e} -D husky`)},create:async()=>{await(0,j.mkdir)(".husky",{recursive:!0}),await(0,j.writeFile)(re,Rt)},update:async()=>{let e=await(0,j.readFile)(re,"utf-8");await(0,j.writeFile)(re,`${e}
80
+ ${Rt}`)}}});var $t={};p($t,{kiro:()=>At});var $,Ae,At,$e=u(()=>{"use strict";$=require("fs/promises");v();g();Ae="./.kiro/steering/linting-and-formatting.md",At={exists:()=>i(Ae),create:async()=>{await(0,$.mkdir)(".kiro/steering",{recursive:!0}),await(0,$.writeFile)(Ae,m)},update:async()=>{await(0,$.mkdir)(".kiro/steering",{recursive:!0}),await(0,$.writeFile)(Ae,m)}}});var Ot={};p(Ot,{lefthook:()=>O});var Ie,C,ae,I,It,O,Oe=u(()=>{"use strict";Ie=require("child_process"),C=require("fs/promises");g();ae="npx ultracite format",I="./lefthook.yml",It=`pre-commit:
81
81
  jobs:
82
82
  - run: ${ae}
83
83
  glob:
@@ -89,7 +89,7 @@ ${Pt}`)}}});var It={};p(It,{kiro:()=>$t});var A,Ae,$t,$e=u(()=>{"use strict";A=r
89
89
  - "*.jsonc"
90
90
  - "*.css"
91
91
  stage_fixed: true
92
- `,I={exists:()=>i($),install:e=>{(0,Ie.execSync)(`${e} -D lefthook`),(0,Ie.execSync)("npx lefthook install")},create:async()=>{await(0,j.writeFile)($,Ot)},update:async()=>{let e=await(0,j.readFile)($,"utf-8");if(!e.includes(ae))if(e.includes("pre-commit:"))if(e.includes("jobs:")){let t=` - run: ${ae}
92
+ `,O={exists:()=>i(I),install:e=>{(0,Ie.execSync)(`${e} -D lefthook`),(0,Ie.execSync)("npx lefthook install")},create:async()=>{await(0,C.writeFile)(I,It)},update:async()=>{let e=await(0,C.readFile)(I,"utf-8");if(!e.includes(ae))if(e.includes("pre-commit:"))if(e.includes("jobs:")){let t=` - run: ${ae}
93
93
  glob:
94
94
  - "*.js"
95
95
  - "*.jsx"
@@ -99,7 +99,7 @@ ${Pt}`)}}});var It={};p(It,{kiro:()=>$t});var A,Ae,$t,$e=u(()=>{"use strict";A=r
99
99
  - "*.jsonc"
100
100
  - "*.css"
101
101
  stage_fixed: true`,s=e.replace(/(pre-commit:\s*\n\s*jobs:\s*\n)/,`$1${t}
102
- `);await(0,j.writeFile)($,s)}else{let t=` jobs:
102
+ `);await(0,C.writeFile)(I,s)}else{let t=` jobs:
103
103
  - run: ${ae}
104
104
  glob:
105
105
  - "*.js"
@@ -110,8 +110,8 @@ ${Pt}`)}}});var It={};p(It,{kiro:()=>$t});var A,Ae,$t,$e=u(()=>{"use strict";A=r
110
110
  - "*.jsonc"
111
111
  - "*.css"
112
112
  stage_fixed: true`,s=e.replace(/(pre-commit:\s*\n)/,`$1${t}
113
- `);await(0,j.writeFile)($,s)}else await(0,j.writeFile)($,`${e}
114
- ${Ot}`)}}});var Et={};p(Et,{lint:()=>Ue});var Jt,Mt,Ue,Je=u(()=>{"use strict";Jt=require("child_process"),Mt=b(require("process")),Ue=e=>{try{let t=e.length>0?e.map(s=>`"${s}"`).join(" "):"./";(0,Jt.execSync)(`npx @biomejs/biome check ${t}`,{stdio:"inherit"})}catch(t){let s=t instanceof Error?t.message:"Unknown error";console.error("Failed to run Ultracite:",s),Mt.default.exit(1)}}});var Nt={};p(Nt,{packageManager:()=>O});var ce,Me,O,Ee=u(()=>{"use strict";ce=require("@clack/prompts");g();Me=[{hint:"Recommended",label:"pnpm",value:"pnpm add",lockfiles:["pnpm-lock.yaml"],monorepoSuffix:"-w"},{label:"bun",value:"bun add",lockfiles:["bun.lockb","bun.lock"],monorepoSuffix:""},{label:"yarn",value:"yarn add",lockfiles:["yarn.lock"],monorepoSuffix:""},{label:"npm",value:"npm install --legacy-peer-deps",lockfiles:["package-lock.json"],monorepoSuffix:"--workspace ."}],O={get:async()=>{let e=await T();e&&ce.log.info("Monorepo detected, updating install command to include workspace flag");for(let t of Me){let s=!1;for(let n of t.lockfiles)if(await i(n)){s=!0;break}if(s)return e&&t.monorepoSuffix?`${t.value} ${t.monorepoSuffix}`:t.value}return null},select:async()=>{let e=await T(),t=await(0,ce.select)({initialValue:"pnpm",message:"Which package manager do you use?",options:Me.map(s=>({label:s.label,value:e&&s.monorepoSuffix?`${s.value} ${s.monorepoSuffix}`:s.value}))});return typeof t!="string"?null:t},isMonorepo:T,options:Me}});var _t={};p(_t,{prettierCleanup:()=>le});var zt,Tt,V,Ne,Wt,Lt,Fs,As,$s,Is,Os,le,ze=u(()=>{"use strict";zt=require("child_process"),Tt=require("fs/promises"),V=require("fs/promises"),Ne=require("jsonc-parser");g();Wt=[".prettierrc",".prettierrc.js",".prettierrc.json",".prettierrc.yml",".prettierrc.yaml",".prettierrc.config.js","prettier.config.js","prettier.config.mjs",".prettierignore"],Lt=async()=>{try{let e=await(0,V.readFile)("package.json","utf-8"),t=(0,Ne.parse)(e);if(!t||typeof t!="object")return[];let s=t.dependencies||{},n=t.devDependencies||{},o={...s,...n};return Object.keys(o).filter(r=>r.startsWith("prettier")||r==="eslint-config-prettier"||r==="eslint-plugin-prettier")}catch{return[]}},Fs=(e,t)=>{if(t.length===0)return;let s=t.join(" ");try{(0,zt.execSync)(`${e} ${s}`,{stdio:"pipe"})}catch{}},As=async()=>{let e=[];for(let t of Wt)if(await i(t))try{await(0,Tt.unlink)(t),e.push(t)}catch{}return e},$s=async()=>{let e="./.vscode/settings.json";if(!await i(e))return!1;try{let t=await(0,V.readFile)(e,"utf-8"),s=(0,Ne.parse)(t);if(!s||typeof s!="object")return!1;let n=!1,o={...s},r=["editor.defaultFormatter","prettier.enable","prettier.requireConfig","prettier.configPath","prettier.printWidth","prettier.tabWidth","prettier.useTabs","prettier.semi","prettier.singleQuote","prettier.quoteProps","prettier.trailingComma","prettier.bracketSpacing","prettier.arrowParens","prettier.endOfLine"];for(let a of r)a in o&&(a==="editor.defaultFormatter"&&o[a]==="esbenp.prettier-vscode"||a!=="editor.defaultFormatter")&&(delete o[a],n=!0);let l=Object.keys(o).filter(a=>a.startsWith("[")&&a.includes("javascript"));for(let a of l){let f=o[a];f&&typeof f=="object"&&"editor.defaultFormatter"in f&&f["editor.defaultFormatter"]==="esbenp.prettier-vscode"&&(delete f["editor.defaultFormatter"],n=!0,Object.keys(f).length===0&&delete o[a])}return n?(await(0,V.writeFile)(e,JSON.stringify(o,null,2)),!0):!1}catch{return!1}},Is=async()=>{if((await Lt()).length>0)return!0;for(let t of Wt)if(await i(t))return!0;return!1},Os=e=>e.startsWith("npm")?"npm uninstall":e.startsWith("yarn")?"yarn remove":e.startsWith("pnpm")?"pnpm remove":e.startsWith("bun")?"bun remove":"npm uninstall",le={hasPrettier:Is,remove:async e=>{let t=await Lt(),s=Os(e);Fs(s,t);let n=await As(),o=await $s();return{packagesRemoved:t,filesRemoved:n,vsCodeCleaned:o}}}});var qt={};p(qt,{title:()=>Te});var Te,We=u(()=>{"use strict";Te=`
113
+ `);await(0,C.writeFile)(I,s)}else await(0,C.writeFile)(I,`${e}
114
+ ${It}`)}}});var Mt={};p(Mt,{lint:()=>Ue});var Ut,Jt,Ue,Je=u(()=>{"use strict";Ut=require("child_process"),Jt=b(require("process")),Ue=e=>{try{let t=e.length>0?e.map(s=>`"${s}"`).join(" "):"./";(0,Ut.execSync)(`npx @biomejs/biome check ${t}`,{stdio:"inherit"})}catch(t){let s=t instanceof Error?t.message:"Unknown error";console.error("Failed to run Ultracite:",s),Jt.default.exit(1)}}});var Et={};p(Et,{packageManager:()=>U});var ce,Me,U,Ee=u(()=>{"use strict";ce=require("@clack/prompts");g();Me=[{hint:"Recommended",label:"pnpm",value:"pnpm add",lockfiles:["pnpm-lock.yaml"],monorepoSuffix:"-w"},{label:"bun",value:"bun add",lockfiles:["bun.lockb","bun.lock"],monorepoSuffix:""},{label:"yarn",value:"yarn add",lockfiles:["yarn.lock"],monorepoSuffix:""},{label:"npm",value:"npm install --legacy-peer-deps",lockfiles:["package-lock.json"],monorepoSuffix:"--workspace ."}],U={get:async()=>{let e=await W();e&&ce.log.info("Monorepo detected, updating install command to include workspace flag");for(let t of Me){let s=!1;for(let n of t.lockfiles)if(await i(n)){s=!0;break}if(s)return e&&t.monorepoSuffix?`${t.value} ${t.monorepoSuffix}`:t.value}return null},select:async()=>{let e=await W(),t=await(0,ce.select)({initialValue:"pnpm",message:"Which package manager do you use?",options:Me.map(s=>({label:s.label,value:e&&s.monorepoSuffix?`${s.value} ${s.monorepoSuffix}`:s.value}))});return typeof t!="string"?null:t},isMonorepo:W,options:Me}});var Lt={};p(Lt,{prettierCleanup:()=>le});var Nt,zt,V,Ne,Tt,Wt,Ps,Fs,As,$s,Is,le,ze=u(()=>{"use strict";Nt=require("child_process"),zt=require("fs/promises"),V=require("fs/promises"),Ne=require("jsonc-parser");g();Tt=[".prettierrc",".prettierrc.js",".prettierrc.json",".prettierrc.yml",".prettierrc.yaml",".prettierrc.config.js","prettier.config.js","prettier.config.mjs",".prettierignore"],Wt=async()=>{try{let e=await(0,V.readFile)("package.json","utf-8"),t=(0,Ne.parse)(e);if(!t||typeof t!="object")return[];let s=t.dependencies||{},n=t.devDependencies||{},o={...s,...n};return Object.keys(o).filter(r=>r.startsWith("prettier")||r==="eslint-config-prettier"||r==="eslint-plugin-prettier")}catch{return[]}},Ps=(e,t)=>{if(t.length===0)return;let s=t.join(" ");try{(0,Nt.execSync)(`${e} ${s}`,{stdio:"pipe"})}catch{}},Fs=async()=>{let e=[];for(let t of Tt)if(await i(t))try{await(0,zt.unlink)(t),e.push(t)}catch{}return e},As=async()=>{let e="./.vscode/settings.json";if(!await i(e))return!1;try{let t=await(0,V.readFile)(e,"utf-8"),s=(0,Ne.parse)(t);if(!s||typeof s!="object")return!1;let n=!1,o={...s},r=["editor.defaultFormatter","prettier.enable","prettier.requireConfig","prettier.configPath","prettier.printWidth","prettier.tabWidth","prettier.useTabs","prettier.semi","prettier.singleQuote","prettier.quoteProps","prettier.trailingComma","prettier.bracketSpacing","prettier.arrowParens","prettier.endOfLine"];for(let a of r)a in o&&(a==="editor.defaultFormatter"&&o[a]==="esbenp.prettier-vscode"||a!=="editor.defaultFormatter")&&(delete o[a],n=!0);let l=Object.keys(o).filter(a=>a.startsWith("[")&&a.includes("javascript"));for(let a of l){let f=o[a];f&&typeof f=="object"&&"editor.defaultFormatter"in f&&f["editor.defaultFormatter"]==="esbenp.prettier-vscode"&&(delete f["editor.defaultFormatter"],n=!0,Object.keys(f).length===0&&delete o[a])}return n?(await(0,V.writeFile)(e,JSON.stringify(o,null,2)),!0):!1}catch{return!1}},$s=async()=>{if((await Wt()).length>0)return!0;for(let t of Tt)if(await i(t))return!0;return!1},Is=e=>e.startsWith("npm")?"npm uninstall":e.startsWith("yarn")?"yarn remove":e.startsWith("pnpm")?"pnpm remove":e.startsWith("bun")?"bun remove":"npm uninstall",le={hasPrettier:$s,remove:async e=>{let t=await Wt(),s=Is(e);Ps(s,t);let n=await Fs(),o=await As();return{packagesRemoved:t,filesRemoved:n,vsCodeCleaned:o}}}});var _t={};p(_t,{title:()=>Te});var Te,We=u(()=>{"use strict";Te=`
115
115
  888 888 888 88888888888 8888888b. d8888 .d8888b. 8888888 88888888888 8888888888
116
116
  888 888 888 888 888 Y88b d88888 d88P Y88b 888 888 888
117
117
  888 888 888 888 888 888 d88P888 888 888 888 888 888
@@ -120,16 +120,16 @@ ${Ot}`)}}});var Et={};p(Et,{lint:()=>Ue});var Jt,Mt,Ue,Je=u(()=>{"use strict";Jt
120
120
  888 888 888 888 888 T88b d88P 888 888 888 888 888 888
121
121
  Y88b. .d88P 888 888 888 T88b d8888888888 Y88b d88P 888 888 888
122
122
  "Y88888P" 88888888 888 888 T88b d88P 888 "Y8888P" 8888888 888 8888888888
123
- `});var Kt={};p(Kt,{tsconfig:()=>G});var K,Ht,Vt,Bt,ue,G,Le=u(()=>{"use strict";K=require("fs/promises"),Ht=b(require("deepmerge")),Vt=require("jsonc-parser");g();Bt={compilerOptions:{strictNullChecks:!0}},ue="./tsconfig.json",G={exists:()=>i(ue),create:()=>(0,K.writeFile)(ue,JSON.stringify(Bt,null,2)),update:async()=>{let e=await(0,K.readFile)(ue,"utf-8"),s=(0,Vt.parse)(e)||{},n=(0,Ht.default)(s,Bt);await(0,K.writeFile)(ue,JSON.stringify(n,null,2))}}});var Yt={};p(Yt,{vscodeCopilot:()=>Y});var U,_e,Gt,Y,qe=u(()=>{"use strict";U=require("fs/promises");v();g();_e="./.github/copilot-instructions.md",Gt=`---
123
+ `});var Vt={};p(Vt,{tsconfig:()=>G});var K,Bt,Ht,qt,ue,G,Le=u(()=>{"use strict";K=require("fs/promises"),Bt=b(require("deepmerge")),Ht=require("jsonc-parser");g();qt={compilerOptions:{strictNullChecks:!0}},ue="./tsconfig.json",G={exists:()=>i(ue),create:()=>(0,K.writeFile)(ue,JSON.stringify(qt,null,2)),update:async()=>{let e=await(0,K.readFile)(ue,"utf-8"),s=(0,Ht.parse)(e)||{},n=(0,Bt.default)(s,qt);await(0,K.writeFile)(ue,JSON.stringify(n,null,2))}}});var Gt={};p(Gt,{vscodeCopilot:()=>Y});var J,_e,Kt,Y,qe=u(()=>{"use strict";J=require("fs/promises");v();g();_e="./.github/copilot-instructions.md",Kt=`---
124
124
  applyTo: "**/*.{ts,tsx,js,jsx}"
125
125
  ---
126
126
 
127
- ${m}`,Y={exists:()=>i(_e),create:async()=>{await(0,U.mkdir)(".github",{recursive:!0}),await(0,U.writeFile)(_e,Gt)},update:async()=>{await(0,U.mkdir)(".github",{recursive:!0}),await(0,U.writeFile)(_e,Gt)}}});var es={};p(es,{vscode:()=>Z});var C,Xt,Qt,Zt,de,Z,Be=u(()=>{"use strict";C=require("fs/promises"),Xt=b(require("deepmerge")),Qt=require("jsonc-parser");g();Zt={"editor.defaultFormatter":"esbenp.prettier-vscode","[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"},"[css]":{"editor.defaultFormatter":"biomejs.biome"},"[graphql]":{"editor.defaultFormatter":"biomejs.biome"},"typescript.tsdk":"node_modules/typescript/lib","editor.formatOnSave":!0,"editor.formatOnPaste":!0,"emmet.showExpandedAbbreviation":"never","editor.codeActionsOnSave":{"source.fixAll.biome":"explicit","source.organizeImports.biome":"explicit"}},de="./.vscode/settings.json",Z={exists:()=>i(de),create:async()=>{await(0,C.mkdir)(".vscode",{recursive:!0}),await(0,C.writeFile)(de,JSON.stringify(Zt,null,2))},update:async()=>{let e=await(0,C.readFile)(de,"utf-8"),s=(0,Qt.parse)(e)||{},n=(0,Xt.default)(s,Zt);await(0,C.writeFile)(de,JSON.stringify(n,null,2))}}});var ts={};p(ts,{windsurf:()=>X});var J,He,X,Ve=u(()=>{"use strict";J=require("fs/promises");v();g();He="./.windsurf/rules/ultracite.md",X={exists:()=>i(He),create:async()=>{await(0,J.mkdir)(".windsurf/rules",{recursive:!0}),await(0,J.writeFile)(He,m)},update:async()=>{await(0,J.mkdir)(".windsurf/rules",{recursive:!0}),await(0,J.writeFile)(He,m)}}});var is={};p(is,{zed:()=>Q});var S,ns,os,ss,pe,Q,Ke=u(()=>{"use strict";S=require("fs/promises"),ns=b(require("deepmerge")),os=require("jsonc-parser");g();ss={formatter:"language_server",format_on_save:"on",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}},JSX:{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}}},lsp:{"typescript-language-server":{settings:{typescript:{preferences:{includePackageJsonAutoImports:"on"}}}}}},pe="./.zed/settings.json",Q={exists:()=>i(pe),create:async()=>{await(0,S.mkdir)(".zed",{recursive:!0}),await(0,S.writeFile)(pe,JSON.stringify(ss,null,2))},update:async()=>{let e=await(0,S.readFile)(pe,"utf-8"),s=(0,os.parse)(e)||{},n=(0,ns.default)(s,ss);await(0,S.writeFile)(pe,JSON.stringify(n,null,2))}}});var rs={};p(rs,{zedCopilot:()=>ee});var E,M,ee,Ge=u(()=>{"use strict";E=require("fs/promises");v();g();M="./.rules",ee={exists:()=>i(M),create:async()=>{await(0,E.writeFile)(M,m)},update:async()=>{if(!await i(M)){await(0,E.writeFile)(M,m);return}let e=await(0,E.readFile)(M,"utf-8");e.includes(m.trim())||await(0,E.writeFile)(M,`${e}
127
+ ${m}`,Y={exists:()=>i(_e),create:async()=>{await(0,J.mkdir)(".github",{recursive:!0}),await(0,J.writeFile)(_e,Kt)},update:async()=>{await(0,J.mkdir)(".github",{recursive:!0}),await(0,J.writeFile)(_e,Kt)}}});var Qt={};p(Qt,{vscode:()=>Z});var S,Zt,Xt,Yt,de,Z,Be=u(()=>{"use strict";S=require("fs/promises"),Zt=b(require("deepmerge")),Xt=require("jsonc-parser");g();Yt={"editor.defaultFormatter":"esbenp.prettier-vscode","[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"},"[css]":{"editor.defaultFormatter":"biomejs.biome"},"[graphql]":{"editor.defaultFormatter":"biomejs.biome"},"typescript.tsdk":"node_modules/typescript/lib","editor.formatOnSave":!0,"editor.formatOnPaste":!0,"emmet.showExpandedAbbreviation":"never","editor.codeActionsOnSave":{"source.fixAll.biome":"explicit","source.organizeImports.biome":"explicit"}},de="./.vscode/settings.json",Z={exists:()=>i(de),create:async()=>{await(0,S.mkdir)(".vscode",{recursive:!0}),await(0,S.writeFile)(de,JSON.stringify(Yt,null,2))},update:async()=>{let e=await(0,S.readFile)(de,"utf-8"),s=(0,Xt.parse)(e)||{},n=(0,Zt.default)(s,Yt);await(0,S.writeFile)(de,JSON.stringify(n,null,2))}}});var es={};p(es,{windsurf:()=>X});var M,He,X,Ve=u(()=>{"use strict";M=require("fs/promises");v();g();He="./.windsurf/rules/ultracite.md",X={exists:()=>i(He),create:async()=>{await(0,M.mkdir)(".windsurf/rules",{recursive:!0}),await(0,M.writeFile)(He,m)},update:async()=>{await(0,M.mkdir)(".windsurf/rules",{recursive:!0}),await(0,M.writeFile)(He,m)}}});var os={};p(os,{zed:()=>Q});var R,ss,ns,ts,pe,Q,Ke=u(()=>{"use strict";R=require("fs/promises"),ss=b(require("deepmerge")),ns=require("jsonc-parser");g();ts={formatter:"language_server",format_on_save:"on",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}},JSX:{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}}},lsp:{"typescript-language-server":{settings:{typescript:{preferences:{includePackageJsonAutoImports:"on"}}}}}},pe="./.zed/settings.json",Q={exists:()=>i(pe),create:async()=>{await(0,R.mkdir)(".zed",{recursive:!0}),await(0,R.writeFile)(pe,JSON.stringify(ts,null,2))},update:async()=>{let e=await(0,R.readFile)(pe,"utf-8"),s=(0,ns.parse)(e)||{},n=(0,ss.default)(s,ts);await(0,R.writeFile)(pe,JSON.stringify(n,null,2))}}});var is={};p(is,{zedCopilot:()=>ee});var N,E,ee,Ge=u(()=>{"use strict";N=require("fs/promises");v();g();E="./.rules",ee={exists:()=>i(E),create:async()=>{await(0,N.writeFile)(E,m)},update:async()=>{if(!await i(E)){await(0,N.writeFile)(E,m);return}let e=await(0,N.readFile)(E,"utf-8");e.includes(m.trim())||await(0,N.writeFile)(E,`${e}
128
128
 
129
- ${m}`)}}});var Js,Ye=u(()=>{Js=tt({"./biome.ts":()=>(be(),d(dt)),"./claude.ts":()=>(ke(),d(vt)),"./codex.ts":()=>(je(),d(kt)),"./cursor.ts":()=>(Se(),d(xt)),"./eslint-cleanup.ts":()=>(Pe(),d(Rt)),"./format.ts":()=>(ye(),d(it)),"./husky.ts":()=>(Fe(),d(At)),"./index.ts":()=>(ls(),d(Us)),"./initialize.ts":()=>(Xe(),d(cs)),"./kiro.ts":()=>($e(),d(It)),"./lefthook.ts":()=>(Oe(),d(Ut)),"./lint-staged.ts":()=>(Ze(),d(as)),"./lint.ts":()=>(Je(),d(Et)),"./package-manager.ts":()=>(Ee(),d(Nt)),"./prettier-cleanup.ts":()=>(ze(),d(_t)),"./title.ts":()=>(We(),d(qt)),"./tsconfig.ts":()=>(Le(),d(Kt)),"./utils.ts":()=>(g(),d(at)),"./vscode-copilot.ts":()=>(qe(),d(Yt)),"./vscode-settings.ts":()=>(Be(),d(es)),"./windsurf.ts":()=>(Ve(),d(ts)),"./zed-settings.ts":()=>(Ke(),d(is)),"./zed.ts":()=>(Ge(),d(rs))})});var as={};p(as,{lintStaged:()=>z});var ds,y,ps,N,me,k,us,Ms,Es,Ns,zs,Ts,Ws,Ls,_s,qs,Qe,Bs,z,Ze=u(()=>{"use strict";ds=require("child_process"),y=require("fs/promises"),ps=require("url"),N=b(require("deepmerge")),me=require("jsonc-parser");g();Ye();k={"*.{js,jsx,ts,tsx,json,jsonc,css,scss,md,mdx}":["npx ultracite format"]},us=["./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"],Ms=(e,t,s,n)=>{let o=e.trim();if(o.includes(":")&&!o.startsWith("-")){s&&n.length>0&&(t[s]=n);let[r,...l]=o.split(":"),a=l.join(":").trim(),f=r.trim().replace(/['"]/g,"");return a&&a!==""?(a.startsWith("[")&&a.endsWith("]")?t[f]=a.slice(1,-1).split(",").map(te=>te.trim().replace(/['"]/g,"")):t[f]=a.replace(/['"]/g,""),{newCurrentKey:null,newCurrentArray:[]}):{newCurrentKey:f,newCurrentArray:[]}}if(o.startsWith("-")&&s){let r=[...n,o.slice(1).trim().replace(/['"]/g,"")];return{newCurrentKey:s,newCurrentArray:r}}return{newCurrentKey:s,newCurrentArray:n}},Es=e=>{let t=e.split(`
130
- `).filter(r=>r.trim()&&!r.trim().startsWith("#")),s={},n=null,o=[];for(let r of t){let l=Ms(r,s,n,o);n=l.newCurrentKey,o=l.newCurrentArray}return n&&o.length>0&&(s[n]=o),s},Ns=e=>{let t="";for(let[s,n]of Object.entries(e))if(Array.isArray(n)){t+=`${s}:
129
+ ${m}`)}}});var Us,Ye=u(()=>{Us=tt({"./biome.ts":()=>(be(),d(dt)),"./claude.ts":()=>(ke(),d(vt)),"./codex.ts":()=>(je(),d(kt)),"./cursor.ts":()=>(Se(),d(xt)),"./eslint-cleanup.ts":()=>(Pe(),d(St)),"./format.ts":()=>(ye(),d(it)),"./husky.ts":()=>(Fe(),d(Ft)),"./index.ts":()=>(cs(),d(Os)),"./initialize.ts":()=>(Xe(),d(as)),"./kiro.ts":()=>($e(),d($t)),"./lefthook.ts":()=>(Oe(),d(Ot)),"./lint-staged.ts":()=>(Ze(),d(rs)),"./lint.ts":()=>(Je(),d(Mt)),"./package-manager.ts":()=>(Ee(),d(Et)),"./prettier-cleanup.ts":()=>(ze(),d(Lt)),"./title.ts":()=>(We(),d(_t)),"./tsconfig.ts":()=>(Le(),d(Vt)),"./utils.ts":()=>(g(),d(at)),"./vscode-copilot.ts":()=>(qe(),d(Gt)),"./vscode-settings.ts":()=>(Be(),d(Qt)),"./windsurf.ts":()=>(Ve(),d(es)),"./zed-settings.ts":()=>(Ke(),d(os)),"./zed.ts":()=>(Ge(),d(is))})});var rs={};p(rs,{lintStaged:()=>T});var us,y,ds,z,me,k,ls,Js,Ms,Es,Ns,zs,Ts,Ws,Ls,_s,Qe,qs,T,Ze=u(()=>{"use strict";us=require("child_process"),y=require("fs/promises"),ds=require("url"),z=b(require("deepmerge")),me=require("jsonc-parser");g();Ye();k={"*.{js,jsx,ts,tsx,json,jsonc,css,scss,md,mdx}":["npx ultracite format"]},ls=["./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"],Js=(e,t,s,n)=>{let o=e.trim();if(o.includes(":")&&!o.startsWith("-")){s&&n.length>0&&(t[s]=n);let[r,...l]=o.split(":"),a=l.join(":").trim(),f=r.trim().replace(/['"]/g,"");return a&&a!==""?(a.startsWith("[")&&a.endsWith("]")?t[f]=a.slice(1,-1).split(",").map(te=>te.trim().replace(/['"]/g,"")):t[f]=a.replace(/['"]/g,""),{newCurrentKey:null,newCurrentArray:[]}):{newCurrentKey:f,newCurrentArray:[]}}if(o.startsWith("-")&&s){let r=[...n,o.slice(1).trim().replace(/['"]/g,"")];return{newCurrentKey:s,newCurrentArray:r}}return{newCurrentKey:s,newCurrentArray:n}},Ms=e=>{let t=e.split(`
130
+ `).filter(r=>r.trim()&&!r.trim().startsWith("#")),s={},n=null,o=[];for(let r of t){let l=Js(r,s,n,o);n=l.newCurrentKey,o=l.newCurrentArray}return n&&o.length>0&&(s[n]=o),s},Es=e=>{let t="";for(let[s,n]of Object.entries(e))if(Array.isArray(n)){t+=`${s}:
131
131
  `;for(let o of n)t+=` - '${o}'
132
132
  `}else t+=`${s}: '${n}'
133
- `;return t},zs=async()=>{try{let e=(0,me.parse)(await(0,y.readFile)("./package.json","utf-8"));return e?e.type==="module":!1}catch{return!1}},Ts=async()=>{let e=(0,me.parse)(await(0,y.readFile)("./package.json","utf-8"));e&&(e["lint-staged"]?e["lint-staged"]=(0,N.default)(e["lint-staged"],k):e["lint-staged"]=k,await(0,y.writeFile)("./package.json",JSON.stringify(e,null,2)))},Ws=async e=>{let t=await(0,y.readFile)(e,"utf-8"),s=(0,me.parse)(t);if(!s)return;let n=(0,N.default)(s,k);await(0,y.writeFile)(e,JSON.stringify(n,null,2))},Ls=async e=>{let t=await(0,y.readFile)(e,"utf-8"),s=Es(t);if(!s)return;let n=(0,N.default)(s,k);await(0,y.writeFile)(e,Ns(n))},_s=async e=>{let n=(await import((0,ps.pathToFileURL)(e).href)).default||{},o=(0,N.default)(n,k),r=`export default ${JSON.stringify(o,null,2)};
134
- `;await(0,y.writeFile)(e,r)},qs=async e=>{delete require.cache[require.resolve(`./${e}`)];let t=Js(`./${e}`),s=(0,N.default)(t,k),n=`module.exports = ${JSON.stringify(s,null,2)};
135
- `;await(0,y.writeFile)(e,n)},Qe=async()=>{await(0,y.writeFile)(".lintstagedrc.json",JSON.stringify(k,null,2))},Bs=async e=>{if(e==="./package.json"){await Ts();return}if(e.endsWith(".json")||e==="./.lintstagedrc"){await Ws(e);return}if(e.endsWith(".yaml")||e.endsWith(".yml")){await Ls(e);return}let t=await zs();if(e.endsWith(".mjs")||e.endsWith(".js")&&t){try{await _s(e)}catch{await Qe()}return}if(e.endsWith(".cjs")||e.endsWith(".js")&&!t)try{await qs(e)}catch{await Qe()}},z={exists:async()=>{for(let e of us)if(await i(e))return!0;return!1},install:e=>{(0,ds.execSync)(`${e} -D lint-staged`)},create:async()=>{await(0,y.writeFile)(".lintstagedrc.json",JSON.stringify(k,null,2))},update:async()=>{let e=null;for(let t of us)if(await i(t)){e=t;break}if(!e){await Qe();return}await Bs(e)}}});var cs={};p(cs,{initialize:()=>et});var fs,w,gs,c,ms,Hs,Vs,Ks,Gs,Ys,Zs,Xs,Qs,en,tn,sn,nn,on,rn,an,cn,ln,un,et,Xe=u(()=>{"use strict";fs=require("child_process"),w=require("fs/promises"),gs=b(require("process")),c=require("@clack/prompts");ne();be();ke();je();Se();Pe();Fe();$e();Oe();Ze();Ee();ze();We();Le();qe();Be();Ve();Ge();Ke();ms=x.devDependencies["@biomejs/biome"],Hs=x.version,Vs=async(e,t=!0)=>{let s=(0,c.spinner)();if(s.start("Installing dependencies..."),t)(0,fs.execSync)(`${e} -D -E ultracite @biomejs/biome@${ms}`);else{let n=await(0,w.readFile)("package.json","utf8"),o=JSON.parse(n),r={...o,devDependencies:{...o.devDependencies,"@biomejs/biome":ms,ultracite:`^${Hs}`}};await(0,w.writeFile)("package.json",JSON.stringify(r,null,2))}s.stop("Dependencies installed.")},Ks=async()=>{let e=(0,c.spinner)();if(e.start("Checking for tsconfig.json..."),await G.exists()){e.message("tsconfig.json found, updating..."),await G.update(),e.stop("tsconfig.json updated.");return}e.message("tsconfig.json not found, creating..."),await G.create(),e.stop("tsconfig.json created.")},Gs=async()=>{let e=(0,c.spinner)();if(e.start("Checking for .vscode/settings.json..."),await Z.exists()){e.message("settings.json found, updating..."),await Z.update(),e.stop("settings.json updated.");return}e.message("settings.json not found, creating..."),await Z.create(),e.stop("settings.json created.")},Ys=async()=>{let e=(0,c.spinner)();if(e.start("Checking for .zed/settings.json..."),await Q.exists()){e.message("settings.json found, updating..."),await Q.update(),e.stop("settings.json updated.");return}e.message("settings.json not found, creating..."),await Q.create(),e.stop("settings.json created.")},Zs=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Biome configuration..."),await L.exists()){e.message("Biome configuration found, updating..."),await L.update(),e.stop("Biome configuration updated.");return}e.message("Biome configuration not found, creating..."),await L.create(),e.stop("Biome configuration created.")},Xs=async(e,t=!0)=>{let s=(0,c.spinner)();if(s.start("Initializing pre-commit hooks..."),s.message("Installing Husky..."),t)F.install(e);else{let n=await(0,w.readFile)("package.json","utf8"),o=JSON.parse(n),r={...o,devDependencies:{...o.devDependencies,husky:"latest"}};await(0,w.writeFile)("package.json",JSON.stringify(r,null,2))}if(await F.exists()){s.message("Pre-commit hook found, updating..."),await F.update(),s.stop("Pre-commit hook updated.");return}s.message("Pre-commit hook not found, creating..."),await F.create(),s.stop("Pre-commit hook created.")},Qs=async(e,t=!0)=>{let s=(0,c.spinner)();if(s.start("Initializing lefthook..."),s.message("Installing lefthook..."),t)I.install(e);else{let n=await(0,w.readFile)("package.json","utf8"),o=JSON.parse(n),r={...o,devDependencies:{...o.devDependencies,lefthook:"latest"}};await(0,w.writeFile)("package.json",JSON.stringify(r,null,2))}if(await I.exists()){s.message("lefthook.yml found, updating..."),await I.update(),s.stop("lefthook.yml updated.");return}s.message("lefthook.yml not found, creating..."),await I.create(),s.stop("lefthook.yml created.")},en=async(e,t=!0)=>{let s=(0,c.spinner)();if(s.start("Initializing lint-staged..."),s.message("Installing lint-staged..."),t)z.install(e);else{let n=await(0,w.readFile)("package.json","utf8"),o=JSON.parse(n),r={...o,devDependencies:{...o.devDependencies,"lint-staged":"latest"}};await(0,w.writeFile)("package.json",JSON.stringify(r,null,2))}if(await z.exists()){s.message("lint-staged found, updating..."),await z.update(),s.stop("lint-staged updated.");return}s.message("lint-staged not found, creating..."),await z.create(),s.stop("lint-staged created.")},tn=async()=>{let e=(0,c.spinner)();if(e.start("Checking for GitHub Copilot rules..."),await Y.exists()){e.message("GitHub Copilot rules found, updating..."),await Y.update(),e.stop("GitHub Copilot rules updated.");return}e.message("GitHub Copilot rules not found, creating..."),await Y.create(),e.stop("GitHub Copilot rules created.")},sn=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Cursor rules..."),await B.exists()){e.message("Cursor rules found, updating..."),await B.update(),e.stop("Cursor rules updated.");return}e.message("Cursor rules not found, creating..."),await B.create(),e.stop("Cursor rules created.")},nn=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Windsurf rules..."),await X.exists()){e.message("Windsurf rules found, updating..."),await X.update(),e.stop("Windsurf rules updated.");return}e.message("Windsurf rules not found, creating..."),await X.create(),e.stop("Windsurf rules created.")},on=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Zed rules..."),await ee.exists()){e.message("Zed rules found, updating..."),await ee.update(),e.stop("Zed rules updated.");return}e.message("Zed rules not found, creating..."),await ee.create(),e.stop("Zed rules created.")},rn=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Claude Code rules..."),await _.exists()){e.message("Claude Code rules found, updating..."),await _.update(),e.stop("Claude Code rules updated.");return}e.message("Claude Code rules not found, creating..."),await _.create(),e.stop("Claude Code rules created.")},an=async()=>{let e=(0,c.spinner)();if(e.start("Checking for OpenAI Codex rules..."),await q.exists()){e.message("OpenAI Codex rules found, updating..."),await q.update(),e.stop("OpenAI Codex rules updated.");return}e.message("OpenAI Codex rules not found, creating..."),await q.create(),e.stop("OpenAI Codex rules created.")},cn=async e=>{let t=(0,c.spinner)();t.start("Removing Prettier dependencies and configuration...");try{let s=await le.remove(e);s.packagesRemoved.length>0&&t.message(`Removed Prettier packages: ${s.packagesRemoved.join(", ")}`),s.filesRemoved.length>0&&t.message(`Removed config files: ${s.filesRemoved.join(", ")}`),s.vsCodeCleaned&&t.message("Cleaned VS Code settings"),t.stop("Prettier removed successfully.")}catch{t.stop("Failed to remove Prettier completely, but continuing...")}},ln=async e=>{let t=(0,c.spinner)();t.start("Removing ESLint dependencies and configuration...");try{let s=await ie.remove(e);s.packagesRemoved.length>0&&t.message(`Removed ESLint packages: ${s.packagesRemoved.join(", ")}`),s.filesRemoved.length>0&&t.message(`Removed config files: ${s.filesRemoved.join(", ")}`),s.vsCodeCleaned&&t.message("Cleaned VS Code settings"),t.stop("ESLint removed successfully.")}catch{t.stop("Failed to remove ESLint completely, but continuing...")}},un=async e=>{if(e){let n=O.options.find(r=>r.label===e);if(!n)throw new Error(`Unsupported package manager: ${e}`);return await O.isMonorepo()&&n.monorepoSuffix?`${n.value} ${n.monorepoSuffix}`:n.value}let t=await O.get();if(t)return c.log.info(`Detected lockfile, using ${t}`),t;let s=await O.select();if(!s)throw new Error("No package manager selected");return s},et=async e=>{(0,c.intro)(Te);try{let t=e??{},s=await un(t.pm),n=t.removePrettier,o=t.removeEslint;if(n===void 0||o===void 0){let f=[];if(n===void 0&&await le.hasPrettier()&&f.push({label:"Remove Prettier (dependencies, config files, VS Code settings)",value:"prettier"}),o===void 0&&await ie.hasESLint()&&f.push({label:"Remove ESLint (dependencies, config files, VS Code settings)",value:"eslint"}),f.length>0){let te=await(0,c.multiselect)({message:"Remove existing formatters/linters (recommended for clean migration)?",options:f,required:!1});n===void 0&&(n=te.includes("prettier")),o===void 0&&(o=te.includes("eslint"))}}let r=t.editors;r||(r=await(0,c.multiselect)({message:"Which editors do you want to configure (recommended)?",options:[{label:"VSCode / Cursor / Windsurf",value:"vscode"},{label:"Zed",value:"zed"}],required:!1}));let l=t.rules;l||(l=await(0,c.multiselect)({message:"Which editor rules do you want to enable (optional)?",options:[{label:"GitHub Copilot (VSCode)",value:"vscode-copilot"},{label:"Cursor",value:"cursor"},{label:"Windsurf",value:"windsurf"},{label:"Zed",value:"zed"},{label:"Claude Code",value:"claude"},{label:"OpenAI Codex",value:"codex"}],required:!1}));let a=t.features;a===void 0&&(t.pm||t.editors||t.rules||t.removePrettier!==void 0||t.removeEslint!==void 0?a=[]:a=await(0,c.multiselect)({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"}],required:!1})),n&&await cn(s),o&&await ln(s),await Vs(s,!t.skipInstall),await Ks(),await Zs(),r?.includes("vscode")&&await Gs(),r?.includes("zed")&&await Ys(),l?.includes("vscode-copilot")&&await tn(),l?.includes("cursor")&&await sn(),l?.includes("windsurf")&&await nn(),l?.includes("zed")&&await on(),l?.includes("claude")&&await rn(),l?.includes("codex")&&await an(),a?.includes("husky")&&await Xs(s,!t.skipInstall),a?.includes("lefthook")&&await Qs(s,!t.skipInstall),a?.includes("lint-staged")&&await en(s,!t.skipInstall),c.log.success("Successfully initialized Ultracite configuration!")}catch(t){let s=t instanceof Error?t.message:"Unknown error";c.log.error(`Failed to initialize Ultracite configuration: ${s}`),gs.default.exit(1)}}});var Us={};var ge,h,fe,dn,pn,ls=u(()=>{ge=require("trpc-cli"),h=b(require("zod"));ne();ye();Xe();Je();fe=ge.trpcServer.initTRPC.meta().create(),dn=fe.router({init:fe.procedure.meta({description:"Initialize Ultracite in the current directory"}).input(h.default.object({pm:h.default.enum(["pnpm","bun","yarn","npm"]).optional().describe("Package manager to use"),editors:h.default.array(h.default.enum(["vscode","zed"])).optional().describe("Editors to configure"),rules:h.default.array(h.default.enum(["vscode-copilot","cursor","windsurf","zed","claude","codex"])).optional().describe("Editor rules to enable"),features:h.default.array(h.default.enum(["husky","lefthook","lint-staged"])).optional().describe("Additional features to enable"),removePrettier:h.default.boolean().optional().describe("Remove Prettier dependencies and configuration"),removeEslint:h.default.boolean().optional().describe("Remove ESLint dependencies and configuration"),skipInstall:h.default.boolean().default(!1).describe("Skip installing dependencies")})).mutation(async({input:e})=>{await et(e)}),lint:fe.procedure.meta({description:"Run Biome linter without fixing files"}).input(h.default.array(h.default.string()).optional().default([]).describe("specific files to lint")).query(({input:e})=>{Ue(e)}),format:fe.procedure.meta({description:"Run Biome linter and fixes files"}).input(h.default.tuple([h.default.array(h.default.string()).optional().default([]).describe("specific files to format"),h.default.object({unsafe:h.default.boolean().optional().describe("apply unsafe fixes")})])).mutation(({input:e})=>{let[t,s]=e;he(t,{unsafe:s.unsafe})})}),pn=(0,ge.createCli)({router:dn,name:"ultracite",version:x.version,description:"Ship code faster and with more confidence."});process.env.VITEST||pn.run()});ls();
133
+ `;return t},Ns=async()=>{try{let e=(0,me.parse)(await(0,y.readFile)("./package.json","utf-8"));return e?e.type==="module":!1}catch{return!1}},zs=async()=>{let e=(0,me.parse)(await(0,y.readFile)("./package.json","utf-8"));e&&(e["lint-staged"]?e["lint-staged"]=(0,z.default)(e["lint-staged"],k):e["lint-staged"]=k,await(0,y.writeFile)("./package.json",JSON.stringify(e,null,2)))},Ts=async e=>{let t=await(0,y.readFile)(e,"utf-8"),s=(0,me.parse)(t);if(!s)return;let n=(0,z.default)(s,k);await(0,y.writeFile)(e,JSON.stringify(n,null,2))},Ws=async e=>{let t=await(0,y.readFile)(e,"utf-8"),s=Ms(t);if(!s)return;let n=(0,z.default)(s,k);await(0,y.writeFile)(e,Es(n))},Ls=async e=>{let n=(await import((0,ds.pathToFileURL)(e).href)).default||{},o=(0,z.default)(n,k),r=`export default ${JSON.stringify(o,null,2)};
134
+ `;await(0,y.writeFile)(e,r)},_s=async e=>{delete require.cache[require.resolve(`./${e}`)];let t=Us(`./${e}`),s=(0,z.default)(t,k),n=`module.exports = ${JSON.stringify(s,null,2)};
135
+ `;await(0,y.writeFile)(e,n)},Qe=async()=>{await(0,y.writeFile)(".lintstagedrc.json",JSON.stringify(k,null,2))},qs=async e=>{if(e==="./package.json"){await zs();return}if(e.endsWith(".json")||e==="./.lintstagedrc"){await Ts(e);return}if(e.endsWith(".yaml")||e.endsWith(".yml")){await Ws(e);return}let t=await Ns();if(e.endsWith(".mjs")||e.endsWith(".js")&&t){try{await Ls(e)}catch{await Qe()}return}if(e.endsWith(".cjs")||e.endsWith(".js")&&!t)try{await _s(e)}catch{await Qe()}},T={exists:async()=>{for(let e of ls)if(await i(e))return!0;return!1},install:e=>{(0,us.execSync)(`${e} -D lint-staged`)},create:async()=>{await(0,y.writeFile)(".lintstagedrc.json",JSON.stringify(k,null,2))},update:async()=>{let e=null;for(let t of ls)if(await i(t)){e=t;break}if(!e){await Qe();return}await qs(e)}}});var as={};p(as,{initialize:()=>et});var ms,w,fs,c,ps,Bs,Hs,Vs,Ks,Gs,Ys,Zs,Xs,Qs,en,tn,sn,nn,on,rn,an,cn,ln,et,Xe=u(()=>{"use strict";ms=require("child_process"),w=require("fs/promises"),fs=b(require("process")),c=require("@clack/prompts");ne();be();ke();je();Se();Pe();Fe();$e();Oe();Ze();Ee();ze();We();Le();qe();Be();Ve();Ge();Ke();ps=x.devDependencies["@biomejs/biome"],Bs=x.version,Hs=async(e,t=!0)=>{let s=(0,c.spinner)();if(s.start("Installing dependencies..."),t)(0,ms.execSync)(`${e} -D -E ultracite @biomejs/biome@${ps}`);else{let n=await(0,w.readFile)("package.json","utf8"),o=JSON.parse(n),r={...o,devDependencies:{...o.devDependencies,"@biomejs/biome":ps,ultracite:`^${Bs}`}};await(0,w.writeFile)("package.json",JSON.stringify(r,null,2))}s.stop("Dependencies installed.")},Vs=async()=>{let e=(0,c.spinner)();if(e.start("Checking for tsconfig.json..."),await G.exists()){e.message("tsconfig.json found, updating..."),await G.update(),e.stop("tsconfig.json updated.");return}e.message("tsconfig.json not found, creating..."),await G.create(),e.stop("tsconfig.json created.")},Ks=async()=>{let e=(0,c.spinner)();if(e.start("Checking for .vscode/settings.json..."),await Z.exists()){e.message("settings.json found, updating..."),await Z.update(),e.stop("settings.json updated.");return}e.message("settings.json not found, creating..."),await Z.create(),e.stop("settings.json created.")},Gs=async()=>{let e=(0,c.spinner)();if(e.start("Checking for .zed/settings.json..."),await Q.exists()){e.message("settings.json found, updating..."),await Q.update(),e.stop("settings.json updated.");return}e.message("settings.json not found, creating..."),await Q.create(),e.stop("settings.json created.")},Ys=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Biome configuration..."),await _.exists()){e.message("Biome configuration found, updating..."),await _.update(),e.stop("Biome configuration updated.");return}e.message("Biome configuration not found, creating..."),await _.create(),e.stop("Biome configuration created.")},Zs=async(e,t=!0)=>{let s=(0,c.spinner)();if(s.start("Initializing pre-commit hooks..."),s.message("Installing Husky..."),t)A.install(e);else{let n=await(0,w.readFile)("package.json","utf8"),o=JSON.parse(n),r={...o,devDependencies:{...o.devDependencies,husky:"latest"}};await(0,w.writeFile)("package.json",JSON.stringify(r,null,2))}if(await A.exists()){s.message("Pre-commit hook found, updating..."),await A.update(),s.stop("Pre-commit hook updated.");return}s.message("Pre-commit hook not found, creating..."),await A.create(),s.stop("Pre-commit hook created.")},Xs=async(e,t=!0)=>{let s=(0,c.spinner)();if(s.start("Initializing lefthook..."),s.message("Installing lefthook..."),t)O.install(e);else{let n=await(0,w.readFile)("package.json","utf8"),o=JSON.parse(n),r={...o,devDependencies:{...o.devDependencies,lefthook:"latest"}};await(0,w.writeFile)("package.json",JSON.stringify(r,null,2))}if(await O.exists()){s.message("lefthook.yml found, updating..."),await O.update(),s.stop("lefthook.yml updated.");return}s.message("lefthook.yml not found, creating..."),await O.create(),s.stop("lefthook.yml created.")},Qs=async(e,t=!0)=>{let s=(0,c.spinner)();if(s.start("Initializing lint-staged..."),s.message("Installing lint-staged..."),t)T.install(e);else{let n=await(0,w.readFile)("package.json","utf8"),o=JSON.parse(n),r={...o,devDependencies:{...o.devDependencies,"lint-staged":"latest"}};await(0,w.writeFile)("package.json",JSON.stringify(r,null,2))}if(await T.exists()){s.message("lint-staged found, updating..."),await T.update(),s.stop("lint-staged updated.");return}s.message("lint-staged not found, creating..."),await T.create(),s.stop("lint-staged created.")},en=async()=>{let e=(0,c.spinner)();if(e.start("Checking for GitHub Copilot rules..."),await Y.exists()){e.message("GitHub Copilot rules found, updating..."),await Y.update(),e.stop("GitHub Copilot rules updated.");return}e.message("GitHub Copilot rules not found, creating..."),await Y.create(),e.stop("GitHub Copilot rules created.")},tn=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Cursor rules..."),await H.exists()){e.message("Cursor rules found, updating..."),await H.update(),e.stop("Cursor rules updated.");return}e.message("Cursor rules not found, creating..."),await H.create(),e.stop("Cursor rules created.")},sn=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Windsurf rules..."),await X.exists()){e.message("Windsurf rules found, updating..."),await X.update(),e.stop("Windsurf rules updated.");return}e.message("Windsurf rules not found, creating..."),await X.create(),e.stop("Windsurf rules created.")},nn=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Zed rules..."),await ee.exists()){e.message("Zed rules found, updating..."),await ee.update(),e.stop("Zed rules updated.");return}e.message("Zed rules not found, creating..."),await ee.create(),e.stop("Zed rules created.")},on=async()=>{let e=(0,c.spinner)();if(e.start("Checking for Claude Code rules..."),await q.exists()){e.message("Claude Code rules found, updating..."),await q.update(),e.stop("Claude Code rules updated.");return}e.message("Claude Code rules not found, creating..."),await q.create(),e.stop("Claude Code rules created.")},rn=async()=>{let e=(0,c.spinner)();if(e.start("Checking for OpenAI Codex rules..."),await B.exists()){e.message("OpenAI Codex rules found, updating..."),await B.update(),e.stop("OpenAI Codex rules updated.");return}e.message("OpenAI Codex rules not found, creating..."),await B.create(),e.stop("OpenAI Codex rules created.")},an=async e=>{let t=(0,c.spinner)();t.start("Removing Prettier dependencies and configuration...");try{let s=await le.remove(e);s.packagesRemoved.length>0&&t.message(`Removed Prettier packages: ${s.packagesRemoved.join(", ")}`),s.filesRemoved.length>0&&t.message(`Removed config files: ${s.filesRemoved.join(", ")}`),s.vsCodeCleaned&&t.message("Cleaned VS Code settings"),t.stop("Prettier removed successfully.")}catch{t.stop("Failed to remove Prettier completely, but continuing...")}},cn=async e=>{let t=(0,c.spinner)();t.start("Removing ESLint dependencies and configuration...");try{let s=await ie.remove(e);s.packagesRemoved.length>0&&t.message(`Removed ESLint packages: ${s.packagesRemoved.join(", ")}`),s.filesRemoved.length>0&&t.message(`Removed config files: ${s.filesRemoved.join(", ")}`),s.vsCodeCleaned&&t.message("Cleaned VS Code settings"),t.stop("ESLint removed successfully.")}catch{t.stop("Failed to remove ESLint completely, but continuing...")}},ln=async e=>{if(e){let n=U.options.find(r=>r.label===e);if(!n)throw new Error(`Unsupported package manager: ${e}`);return await U.isMonorepo()&&n.monorepoSuffix?`${n.value} ${n.monorepoSuffix}`:n.value}let t=await U.get();if(t)return c.log.info(`Detected lockfile, using ${t}`),t;let s=await U.select();if(!s)throw new Error("No package manager selected");return s},et=async e=>{(0,c.intro)(Te);try{let t=e??{},s=await ln(t.pm),n=t.removePrettier,o=t.removeEslint;if(n===void 0||o===void 0){let f=[];if(n===void 0&&await le.hasPrettier()&&f.push({label:"Remove Prettier (dependencies, config files, VS Code settings)",value:"prettier"}),o===void 0&&await ie.hasESLint()&&f.push({label:"Remove ESLint (dependencies, config files, VS Code settings)",value:"eslint"}),f.length>0){let te=await(0,c.multiselect)({message:"Remove existing formatters/linters (recommended for clean migration)?",options:f,required:!1});n===void 0&&(n=te.includes("prettier")),o===void 0&&(o=te.includes("eslint"))}}let r=t.editors;r||(r=await(0,c.multiselect)({message:"Which editors do you want to configure (recommended)?",options:[{label:"VSCode / Cursor / Windsurf",value:"vscode"},{label:"Zed",value:"zed"}],required:!1}));let l=t.rules;l||(l=await(0,c.multiselect)({message:"Which editor rules do you want to enable (optional)?",options:[{label:"GitHub Copilot (VSCode)",value:"vscode-copilot"},{label:"Cursor",value:"cursor"},{label:"Windsurf",value:"windsurf"},{label:"Zed",value:"zed"},{label:"Claude Code",value:"claude"},{label:"OpenAI Codex",value:"codex"}],required:!1}));let a=t.features;a===void 0&&(t.pm||t.editors||t.rules||t.removePrettier!==void 0||t.removeEslint!==void 0?a=[]:a=await(0,c.multiselect)({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"}],required:!1})),n&&await an(s),o&&await cn(s),await Hs(s,!t.skipInstall),await Vs(),await Ys(),r?.includes("vscode")&&await Ks(),r?.includes("zed")&&await Gs(),l?.includes("vscode-copilot")&&await en(),l?.includes("cursor")&&await tn(),l?.includes("windsurf")&&await sn(),l?.includes("zed")&&await nn(),l?.includes("claude")&&await on(),l?.includes("codex")&&await rn(),a?.includes("husky")&&await Zs(s,!t.skipInstall),a?.includes("lefthook")&&await Xs(s,!t.skipInstall),a?.includes("lint-staged")&&await Qs(s,!t.skipInstall),c.log.success("Successfully initialized Ultracite configuration!")}catch(t){let s=t instanceof Error?t.message:"Unknown error";c.log.error(`Failed to initialize Ultracite configuration: ${s}`),fs.default.exit(1)}}});var Os={};var ge,h,fe,un,dn,cs=u(()=>{ge=require("trpc-cli"),h=b(require("zod"));ne();ye();Xe();Je();fe=ge.trpcServer.initTRPC.meta().create(),un=fe.router({init:fe.procedure.meta({description:"Initialize Ultracite in the current directory"}).input(h.default.object({pm:h.default.enum(["pnpm","bun","yarn","npm"]).optional().describe("Package manager to use"),editors:h.default.array(h.default.enum(["vscode","zed"])).optional().describe("Editors to configure"),rules:h.default.array(h.default.enum(["vscode-copilot","cursor","windsurf","zed","claude","codex"])).optional().describe("Editor rules to enable"),features:h.default.array(h.default.enum(["husky","lefthook","lint-staged"])).optional().describe("Additional features to enable"),removePrettier:h.default.boolean().optional().describe("Remove Prettier dependencies and configuration"),removeEslint:h.default.boolean().optional().describe("Remove ESLint dependencies and configuration"),skipInstall:h.default.boolean().default(!1).describe("Skip installing dependencies")})).mutation(async({input:e})=>{await et(e)}),lint:fe.procedure.meta({description:"Run Biome linter without fixing files"}).input(h.default.array(h.default.string()).optional().default([]).describe("specific files to lint")).query(({input:e})=>{Ue(e)}),format:fe.procedure.meta({description:"Run Biome linter and fixes files"}).input(h.default.tuple([h.default.array(h.default.string()).optional().default([]).describe("specific files to format"),h.default.object({unsafe:h.default.boolean().optional().describe("apply unsafe fixes")})])).mutation(({input:e})=>{let[t,s]=e;he(t,{unsafe:s.unsafe})})}),dn=(0,ge.createCli)({router:un,name:"ultracite",version:x.version,description:"Ship code faster and with more confidence."});process.env.VITEST||dn.run()});cs();
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- var ee=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var es=Object.getOwnPropertyNames;var ts=Object.prototype.hasOwnProperty;var te=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Te=e=>t=>{var s=e[t];if(s)return s();throw new Error("Module not found in bundle: "+t)};var l=(e,t)=>()=>(e&&(t=e(e=0)),t);var d=(e,t)=>{for(var s in t)ee(e,s,{get:t[s],enumerable:!0})},ss=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of es(t))!ts.call(e,o)&&o!==s&&ee(e,o,{get:()=>t[o],enumerable:!(n=Qt(t,o))||n.enumerable});return e};var u=e=>ss(ee({},"__esModule",{value:!0}),e);var b,T=l(()=>{b={name:"ultracite",description:"The AI-ready formatter that helps you write and generate code faster.",version:"5.1.5",bin:{ultracite:"dist/index.js"},files:["biome.jsonc","dist"],scripts:{build:"tsup",test:"vitest run","test:coverage":"vitest --coverage"},main:"./biome.jsonc",author:"Hayden Bleasel <hello@haydenbleasel.com>",bugs:{url:"https://github.com/haydenbleasel/ultracite/issues"},homepage:"https://github.com/haydenbleasel/ultracite#readme",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:{"@auto-it/all-contributors":"^11.3.0","@auto-it/first-time-contributor":"^11.3.0","@biomejs/biome":"2.2.0","@types/node":"^24.0.14","@vitest/coverage-v8":"3.2.4",tsup:"^8.5.0"},dependencies:{"@clack/prompts":"^0.11.0",deepmerge:"^4.3.1","jsonc-parser":"^3.3.1","trpc-cli":"^0.10.0",vitest:"^3.2.4",zod:"^4.0.5"},packageManager:"pnpm@10.13.1"}});var We={};d(We,{format:()=>se});import{execSync as os}from"child_process";import is from"process";var se,ne=l(()=>{"use strict";se=(e,t={})=>{try{let s=e.length>0?e.map(o=>`"${o}"`).join(" "):"./",n=t.unsafe?" --unsafe":"";os(`npx @biomejs/biome check --write${n} ${s}`,{stdio:"inherit"})}catch(s){let n=s instanceof Error?s.message:"Unknown error";console.error("Failed to run Ultracite:",n),is.exit(1)}}});var Le={};d(Le,{exists:()=>i,isMonorepo:()=>R});import{access as rs,readFile as as}from"fs/promises";import{parse as cs}from"jsonc-parser";var i,R,f=l(()=>{"use strict";i=async e=>{try{return await rs(e),!0}catch{return!1}},R=async()=>{if(await i("pnpm-workspace.yaml"))return!0;try{let e=cs(await as("package.json","utf-8"));return e?!!e.workspaces:!1}catch{return!1}}});var Be={};d(Be,{biome:()=>P});import{readFile as ls,writeFile as _e}from"fs/promises";import us from"deepmerge";import{parse as ds}from"jsonc-parser";var ps,qe,oe,P,ie=l(()=>{"use strict";f();T();ps=b.devDependencies["@biomejs/biome"],qe={$schema:`https://biomejs.dev/schemas/${ps}/schema.json`,extends:["ultracite"]},oe=async()=>await i("./biome.json")?"./biome.json":"./biome.jsonc",P={exists:async()=>{let e=await oe();return i(e)},create:async()=>{let e=await oe();return _e(e,JSON.stringify(qe,null,2))},update:async()=>{let e=await oe(),t=await ls(e,"utf-8"),n=ds(t)||{},o=n.extends&&Array.isArray(n.extends)?n.extends:[];o.includes("ultracite")||(n.extends=[...o,"ultracite"]);let r={$schema:qe.$schema},c=us(n,r);await _e(e,JSON.stringify(c,null,2))}}});var He,Ve,Ke,Ge,Ye,Ze,Xe,Qe,Vn,p,y=l(()=>{"use strict";He=["Don't use `accessKey` attribute on any HTML element.",'Don\'t set `aria-hidden="true"` on focusable elements.',"Don't add ARIA roles, states, and properties to elements that don't support them.","Don't use distracting elements like `<marquee>` or `<blink>`.","Only use the `scope` prop on `<th>` elements.","Don't assign non-interactive ARIA roles to interactive HTML elements.","Make sure label elements have text content and are associated with an input.","Don't assign interactive ARIA roles to non-interactive HTML elements.","Don't assign `tabIndex` to non-interactive HTML elements.","Don't use positive integers for `tabIndex` property.",`Don't include "image", "picture", or "photo" in img alt prop.`,"Don't use explicit role property that's the same as the implicit/default role.","Make static elements with click handlers use a valid role attribute.","Always include a `title` element for SVG elements.","Give all elements requiring alt text meaningful information for screen readers.","Make sure anchors have content that's accessible to screen readers.","Assign `tabIndex` to non-interactive HTML elements with `aria-activedescendant`.","Include all required ARIA attributes for elements with ARIA roles.","Make sure ARIA properties are valid for the element's supported roles.","Always include a `type` attribute for button elements.","Make elements with interactive roles and handlers focusable.","Give heading elements content that's accessible to screen readers (not hidden with `aria-hidden`).","Always include a `lang` attribute on the html element.","Always include a `title` attribute for iframe elements.","Accompany `onClick` with at least one of: `onKeyUp`, `onKeyDown`, or `onKeyPress`.","Accompany `onMouseOver`/`onMouseOut` with `onFocus`/`onBlur`.","Include caption tracks for audio and video elements.","Use semantic elements instead of role attributes in JSX.","Make sure all anchors are valid and navigable.","Ensure all ARIA properties (`aria-*`) are valid.","Use valid, non-abstract ARIA roles for elements with ARIA roles.","Use valid ARIA state and property values.","Use valid values for the `autocomplete` attribute on input elements.","Use correct ISO language/country codes for the `lang` attribute."],Ve=["Don't use consecutive spaces in regular expression literals.","Don't use the `arguments` object.","Don't use primitive type aliases or misleading types.","Don't use the comma operator.","Don't use empty type parameters in type aliases and interfaces.","Don't write functions that exceed a given Cognitive Complexity score.","Don't nest describe() blocks too deeply in test files.","Don't use unnecessary boolean casts.","Don't use unnecessary callbacks with flatMap.","Use for...of statements instead of Array.forEach.","Don't create classes that only have static members (like a static namespace).","Don't use this and super in static contexts.","Don't use unnecessary catch clauses.","Don't use unnecessary constructors.","Don't use unnecessary continue statements.","Don't export empty modules that don't change anything.","Don't use unnecessary escape sequences in regular expression literals.","Don't use unnecessary fragments.","Don't use unnecessary labels.","Don't use unnecessary nested block statements.","Don't rename imports, exports, and destructured assignments to the same name.","Don't use unnecessary string or template literal concatenation.","Don't use String.raw in template literals when there are no escape sequences.","Don't use useless case statements in switch statements.","Don't use ternary operators when simpler alternatives exist.","Don't use useless `this` aliasing.","Don't use any or unknown as type constraints.","Don't initialize variables to undefined.","Don't use the void operators (they're not familiar).","Use arrow functions instead of function expressions.","Use Date.now() to get milliseconds since the Unix Epoch.","Use .flatMap() instead of map().flat() when possible.","Use literal property access instead of computed property access.","Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.","Use concise optional chaining instead of chained logical expressions.","Use regular expression literals instead of the RegExp constructor when possible.","Don't use number literal object member names that aren't base 10 or use underscore separators.","Remove redundant terms from logical expressions.","Use while loops instead of for loops when you don't need initializer and update expressions.","Don't pass children as props.","Don't reassign const variables.","Don't use constant expressions in conditions.","Don't use `Math.min` and `Math.max` to clamp values when the result is constant.","Don't return a value from a constructor.","Don't use empty character classes in regular expression literals.","Don't use empty destructuring patterns.","Don't call global object properties as functions.","Don't declare functions and vars that are accessible outside their block.","Make sure builtins are correctly instantiated.","Don't use super() incorrectly inside classes. Also check that super() is called in classes that extend other constructors.","Don't use variables and function parameters before they're declared.","Don't use 8 and 9 escape sequences in string literals.","Don't use literal numbers that lose precision."],Ke=["Don't use the return value of React.render.","Make sure all dependencies are correctly specified in React hooks.","Make sure all React hooks are called from the top level of component functions.","Don't forget key props in iterators and collection literals.","Don't destructure props inside JSX components in Solid projects.","Don't define React components inside other components.","Don't use event handlers on non-interactive elements.","Don't assign to React component props.","Don't use both `children` and `dangerouslySetInnerHTML` props on the same element.","Don't use dangerous JSX props.","Don't use Array index in keys.","Don't insert comments as text nodes.","Don't assign JSX properties multiple times.","Don't add extra closing tags for components without children.","Use `<>...</>` instead of `<Fragment>...</Fragment>`.",'Watch out for possible "wrong" semicolons inside JSX elements.'],Ge=["Don't assign a value to itself.","Don't return a value from a setter.","Don't compare expressions that modify string case with non-compliant values.","Don't use lexical declarations in switch clauses.","Don't use variables that haven't been declared in the document.","Don't write unreachable code.","Make sure super() is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass.","Don't use control flow statements in finally blocks.","Don't use optional chaining where undefined values aren't allowed.","Don't have unused function parameters.","Don't have unused imports.","Don't have unused labels.","Don't have unused private class members.","Don't have unused variables.","Make sure void (self-closing) elements don't have children.","Don't return a value from a function with the return type 'void'","Use isNaN() when checking for NaN.",'Make sure "for" loop update clauses move the counter in the right direction.',"Make sure typeof expressions are compared to valid values.","Make sure generator functions contain yield.","Don't use await inside loops.","Don't use bitwise operators.","Don't use expressions where the operation doesn't change the value.","Make sure Promise-like statements are handled appropriately.","Don't use __dirname and __filename in the global scope.","Prevent import cycles.","Don't use configured elements.","Don't hardcode sensitive data like API keys and tokens.","Don't let variable declarations shadow variables from outer scopes.","Don't use the TypeScript directive @ts-ignore.","Prevent duplicate polyfills from Polyfill.io.","Don't use useless backreferences in regular expressions that always match empty strings.","Don't use unnecessary escapes in string literals.","Don't use useless undefined.","Make sure getters and setters for the same property are next to each other in class and object definitions.","Make sure object literals are declared consistently (defaults to explicit definitions).","Use static Response methods instead of new Response() constructor when possible.","Make sure switch-case statements are exhaustive.","Make sure the `preconnect` attribute is used when using Google Fonts.","Use `Array#{indexOf,lastIndexOf}()` instead of `Array#{findIndex,findLastIndex}()` when looking for the index of an item.","Make sure iterable callbacks return consistent values.",'Use `with { type: "json" }` for JSON module imports.',"Use numeric separators in numeric literals.","Use object spread instead of `Object.assign()` when constructing new objects.","Always use the radix argument when using `parseInt()`.","Make sure JSDoc comment lines start with a single asterisk, except for the first one.","Include a description parameter for `Symbol()`.","Don't use spread (`...`) syntax on accumulators.","Don't use the `delete` operator.","Don't access namespace imports dynamically.","Don't use namespace imports.","Declare regex literals at the top level.",'Don\'t use `target="_blank"` without `rel="noopener"`.'],Ye=["Don't use TypeScript enums.","Don't export imported variables.","Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.","Don't use TypeScript namespaces.","Don't use non-null assertions with the `!` postfix operator.","Don't use parameter properties in class constructors.","Don't use user-defined types.","Use `as const` instead of literal types and type annotations.","Use either `T[]` or `Array<T>` consistently.","Initialize each enum member value explicitly.","Use `export type` for types.","Use `import type` for types.","Make sure all enum members are literal values.","Don't use TypeScript const enum.","Don't declare empty interfaces.","Don't let variables evolve into any type through reassignments.","Don't use the any type.","Don't misuse the non-null assertion operator (!) in TypeScript files.","Don't use implicit any type on variable declarations.","Don't merge interfaces and classes unsafely.","Don't use overload signatures that aren't next to each other.","Use the namespace keyword instead of the module keyword to declare TypeScript namespaces."],Ze=["Don't use global `eval()`.","Don't use callbacks in asynchronous tests and hooks.","Don't use negation in `if` statements that have `else` clauses.","Don't use nested ternary expressions.","Don't reassign function parameters.","This rule lets you specify global variable names you don't want to use in your application.","Don't use specified modules when loaded by import or require.","Don't use constants whose value is the upper-case version of their name.","Use `String.slice()` instead of `String.substr()` and `String.substring()`.","Don't use template literals if you don't need interpolation or special-character handling.","Don't use `else` blocks when the `if` block breaks early.","Don't use yoda expressions.","Don't use Array constructors.","Use `at()` instead of integer index access.","Follow curly brace conventions.","Use `else if` instead of nested `if` statements in `else` clauses.","Use single `if` statements instead of nested `if` clauses.","Use `new` for all builtins except `String`, `Number`, and `Boolean`.","Use consistent accessibility modifiers on class properties and methods.","Use `const` declarations for variables that are only assigned once.","Put default function parameters and optional function parameters last.","Include a `default` clause in switch statements.","Use the `**` operator instead of `Math.pow`.","Use `for-of` loops when you need the index to extract an item from the iterated array.","Use `node:assert/strict` over `node:assert`.","Use the `node:` protocol for Node.js builtin modules.","Use Number properties instead of global ones.","Use assignment operator shorthand where possible.","Use function types instead of object types with call signatures.","Use template literals over string concatenation.","Use `new` when throwing an error.","Don't throw non-Error values.","Use `String.trimStart()` and `String.trimEnd()` over `String.trimLeft()` and `String.trimRight()`.","Use standard constants instead of approximated literals.","Don't assign values in expressions.","Don't use async functions as Promise executors.","Don't reassign exceptions in catch clauses.","Don't reassign class members.","Don't compare against -0.","Don't use labeled statements that aren't loops.","Don't use void type outside of generic or return types.","Don't use console.","Don't use control characters and escape sequences that match control characters in regular expression literals.","Don't use debugger.","Don't assign directly to document.cookie.","Use `===` and `!==`.","Don't use duplicate case labels.","Don't use duplicate class members.","Don't use duplicate conditions in if-else-if chains.","Don't use two keys with the same name inside objects.","Don't use duplicate function parameter names.","Don't have duplicate hooks in describe blocks.","Don't use empty block statements and static blocks.","Don't let switch clauses fall through.","Don't reassign function declarations.","Don't allow assignments to native objects and read-only global variables.","Use Number.isFinite instead of global isFinite.","Use Number.isNaN instead of global isNaN.","Don't assign to imported bindings.","Don't use irregular whitespace characters.","Don't use labels that share a name with a variable.","Don't use characters made with multiple code points in character class syntax.","Make sure to use new and constructor properly.","Don't use shorthand assign when the variable appears on both sides.","Don't use octal escape sequences in string literals.","Don't use Object.prototype builtins directly.","Don't redeclare variables, functions, classes, and types in the same scope.",`Don't have redundant "use strict".`,"Don't compare things where both sides are exactly the same.","Don't let identifiers shadow restricted names.","Don't use sparse arrays (arrays with holes).","Don't use template literal placeholder syntax in regular strings.","Don't use the then property.","Don't use unsafe negation.","Don't use var.","Don't use with statements in non-strict contexts.","Make sure async functions actually use await.","Make sure default clauses in switch statements come last.","Make sure to pass a message value when creating a built-in error.","Make sure get methods always return a value.","Use a recommended display strategy with Google Fonts.","Make sure for-in loops include an if statement.","Use Array.isArray() instead of instanceof Array.","Make sure to use the digits argument with Number#toFixed().",'Make sure to use the "use strict" directive in script files.'],Xe=["Don't use `<img>` elements in Next.js projects.","Don't use `<head>` elements in Next.js projects.","Don't import next/document outside of pages/_document.jsx in Next.js projects.","Don't use the next/head module in pages/_document.js on Next.js projects."],Qe=["Don't use export or module.exports in test files.","Don't use focused tests.","Make sure the assertion function, like expect, is placed inside an it() function call.","Don't use disabled tests."],Vn=[...He,...Ve,...Ke,...Ge,...Ye,...Ze,...Xe,...Qe],p=`# Project Context
2
+ var ee=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var es=Object.getOwnPropertyNames;var ts=Object.prototype.hasOwnProperty;var te=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Te=e=>t=>{var s=e[t];if(s)return s();throw new Error("Module not found in bundle: "+t)};var l=(e,t)=>()=>(e&&(t=e(e=0)),t);var d=(e,t)=>{for(var s in t)ee(e,s,{get:t[s],enumerable:!0})},ss=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of es(t))!ts.call(e,o)&&o!==s&&ee(e,o,{get:()=>t[o],enumerable:!(n=Qt(t,o))||n.enumerable});return e};var u=e=>ss(ee({},"__esModule",{value:!0}),e);var b,T=l(()=>{b={name:"ultracite",description:"The AI-ready formatter that helps you write and generate code faster.",version:"5.1.6",bin:{ultracite:"dist/index.js"},files:["biome.jsonc","dist"],scripts:{build:"tsup",test:"vitest run","test:coverage":"vitest --coverage"},main:"./biome.jsonc",author:"Hayden Bleasel <hello@haydenbleasel.com>",bugs:{url:"https://github.com/haydenbleasel/ultracite/issues"},homepage:"https://github.com/haydenbleasel/ultracite#readme",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:{"@auto-it/all-contributors":"^11.3.0","@auto-it/first-time-contributor":"^11.3.0","@biomejs/biome":"2.2.0","@types/node":"^24.0.14","@vitest/coverage-v8":"3.2.4",tsup:"^8.5.0"},dependencies:{"@clack/prompts":"^0.11.0",deepmerge:"^4.3.1","jsonc-parser":"^3.3.1","trpc-cli":"^0.10.0",vitest:"^3.2.4",zod:"^4.0.5"},packageManager:"pnpm@10.13.1"}});var We={};d(We,{format:()=>se});import{execSync as os}from"child_process";import is from"process";var se,ne=l(()=>{"use strict";se=(e,t={})=>{try{let s=e.length>0?e.map(o=>`"${o}"`).join(" "):"./",n=t.unsafe?" --unsafe":"";os(`npx @biomejs/biome check --write${n} ${s}`,{stdio:"inherit"})}catch(s){let n=s instanceof Error?s.message:"Unknown error";console.error("Failed to run Ultracite:",n),is.exit(1)}}});var Le={};d(Le,{exists:()=>i,isMonorepo:()=>R});import{access as rs,readFile as as}from"fs/promises";import{parse as cs}from"jsonc-parser";var i,R,f=l(()=>{"use strict";i=async e=>{try{return await rs(e),!0}catch{return!1}},R=async()=>{if(await i("pnpm-workspace.yaml"))return!0;try{let e=cs(await as("package.json","utf-8"));return e?!!e.workspaces:!1}catch{return!1}}});var Be={};d(Be,{biome:()=>P});import{readFile as ls,writeFile as _e}from"fs/promises";import us from"deepmerge";import{parse as ds}from"jsonc-parser";var ps,qe,oe,P,ie=l(()=>{"use strict";f();T();ps=b.devDependencies["@biomejs/biome"],qe={$schema:`https://biomejs.dev/schemas/${ps}/schema.json`,extends:["ultracite"]},oe=async()=>await i("./biome.json")?"./biome.json":"./biome.jsonc",P={exists:async()=>{let e=await oe();return i(e)},create:async()=>{let e=await oe();return _e(e,JSON.stringify(qe,null,2))},update:async()=>{let e=await oe(),t=await ls(e,"utf-8"),n=ds(t)||{},o=n.extends&&Array.isArray(n.extends)?n.extends:[];o.includes("ultracite")||(n.extends=[...o,"ultracite"]);let r={$schema:qe.$schema},c=us(n,r);await _e(e,JSON.stringify(c,null,2))}}});var He,Ve,Ke,Ge,Ye,Ze,Xe,Qe,Vn,p,y=l(()=>{"use strict";He=["Don't use `accessKey` attribute on any HTML element.",'Don\'t set `aria-hidden="true"` on focusable elements.',"Don't add ARIA roles, states, and properties to elements that don't support them.","Don't use distracting elements like `<marquee>` or `<blink>`.","Only use the `scope` prop on `<th>` elements.","Don't assign non-interactive ARIA roles to interactive HTML elements.","Make sure label elements have text content and are associated with an input.","Don't assign interactive ARIA roles to non-interactive HTML elements.","Don't assign `tabIndex` to non-interactive HTML elements.","Don't use positive integers for `tabIndex` property.",`Don't include "image", "picture", or "photo" in img alt prop.`,"Don't use explicit role property that's the same as the implicit/default role.","Make static elements with click handlers use a valid role attribute.","Always include a `title` element for SVG elements.","Give all elements requiring alt text meaningful information for screen readers.","Make sure anchors have content that's accessible to screen readers.","Assign `tabIndex` to non-interactive HTML elements with `aria-activedescendant`.","Include all required ARIA attributes for elements with ARIA roles.","Make sure ARIA properties are valid for the element's supported roles.","Always include a `type` attribute for button elements.","Make elements with interactive roles and handlers focusable.","Give heading elements content that's accessible to screen readers (not hidden with `aria-hidden`).","Always include a `lang` attribute on the html element.","Always include a `title` attribute for iframe elements.","Accompany `onClick` with at least one of: `onKeyUp`, `onKeyDown`, or `onKeyPress`.","Accompany `onMouseOver`/`onMouseOut` with `onFocus`/`onBlur`.","Include caption tracks for audio and video elements.","Use semantic elements instead of role attributes in JSX.","Make sure all anchors are valid and navigable.","Ensure all ARIA properties (`aria-*`) are valid.","Use valid, non-abstract ARIA roles for elements with ARIA roles.","Use valid ARIA state and property values.","Use valid values for the `autocomplete` attribute on input elements.","Use correct ISO language/country codes for the `lang` attribute."],Ve=["Don't use consecutive spaces in regular expression literals.","Don't use the `arguments` object.","Don't use primitive type aliases or misleading types.","Don't use the comma operator.","Don't use empty type parameters in type aliases and interfaces.","Don't write functions that exceed a given Cognitive Complexity score.","Don't nest describe() blocks too deeply in test files.","Don't use unnecessary boolean casts.","Don't use unnecessary callbacks with flatMap.","Use for...of statements instead of Array.forEach.","Don't create classes that only have static members (like a static namespace).","Don't use this and super in static contexts.","Don't use unnecessary catch clauses.","Don't use unnecessary constructors.","Don't use unnecessary continue statements.","Don't export empty modules that don't change anything.","Don't use unnecessary escape sequences in regular expression literals.","Don't use unnecessary fragments.","Don't use unnecessary labels.","Don't use unnecessary nested block statements.","Don't rename imports, exports, and destructured assignments to the same name.","Don't use unnecessary string or template literal concatenation.","Don't use String.raw in template literals when there are no escape sequences.","Don't use useless case statements in switch statements.","Don't use ternary operators when simpler alternatives exist.","Don't use useless `this` aliasing.","Don't use any or unknown as type constraints.","Don't initialize variables to undefined.","Don't use the void operators (they're not familiar).","Use arrow functions instead of function expressions.","Use Date.now() to get milliseconds since the Unix Epoch.","Use .flatMap() instead of map().flat() when possible.","Use literal property access instead of computed property access.","Don't use parseInt() or Number.parseInt() when binary, octal, or hexadecimal literals work.","Use concise optional chaining instead of chained logical expressions.","Use regular expression literals instead of the RegExp constructor when possible.","Don't use number literal object member names that aren't base 10 or use underscore separators.","Remove redundant terms from logical expressions.","Use while loops instead of for loops when you don't need initializer and update expressions.","Don't pass children as props.","Don't reassign const variables.","Don't use constant expressions in conditions.","Don't use `Math.min` and `Math.max` to clamp values when the result is constant.","Don't return a value from a constructor.","Don't use empty character classes in regular expression literals.","Don't use empty destructuring patterns.","Don't call global object properties as functions.","Don't declare functions and vars that are accessible outside their block.","Make sure builtins are correctly instantiated.","Don't use super() incorrectly inside classes. Also check that super() is called in classes that extend other constructors.","Don't use variables and function parameters before they're declared.","Don't use 8 and 9 escape sequences in string literals.","Don't use literal numbers that lose precision."],Ke=["Don't use the return value of React.render.","Make sure all dependencies are correctly specified in React hooks.","Make sure all React hooks are called from the top level of component functions.","Don't forget key props in iterators and collection literals.","Don't destructure props inside JSX components in Solid projects.","Don't define React components inside other components.","Don't use event handlers on non-interactive elements.","Don't assign to React component props.","Don't use both `children` and `dangerouslySetInnerHTML` props on the same element.","Don't use dangerous JSX props.","Don't use Array index in keys.","Don't insert comments as text nodes.","Don't assign JSX properties multiple times.","Don't add extra closing tags for components without children.","Use `<>...</>` instead of `<Fragment>...</Fragment>`.",'Watch out for possible "wrong" semicolons inside JSX elements.'],Ge=["Don't assign a value to itself.","Don't return a value from a setter.","Don't compare expressions that modify string case with non-compliant values.","Don't use lexical declarations in switch clauses.","Don't use variables that haven't been declared in the document.","Don't write unreachable code.","Make sure super() is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass.","Don't use control flow statements in finally blocks.","Don't use optional chaining where undefined values aren't allowed.","Don't have unused function parameters.","Don't have unused imports.","Don't have unused labels.","Don't have unused private class members.","Don't have unused variables.","Make sure void (self-closing) elements don't have children.","Don't return a value from a function with the return type 'void'","Use isNaN() when checking for NaN.",'Make sure "for" loop update clauses move the counter in the right direction.',"Make sure typeof expressions are compared to valid values.","Make sure generator functions contain yield.","Don't use await inside loops.","Don't use bitwise operators.","Don't use expressions where the operation doesn't change the value.","Make sure Promise-like statements are handled appropriately.","Don't use __dirname and __filename in the global scope.","Prevent import cycles.","Don't use configured elements.","Don't hardcode sensitive data like API keys and tokens.","Don't let variable declarations shadow variables from outer scopes.","Don't use the TypeScript directive @ts-ignore.","Prevent duplicate polyfills from Polyfill.io.","Don't use useless backreferences in regular expressions that always match empty strings.","Don't use unnecessary escapes in string literals.","Don't use useless undefined.","Make sure getters and setters for the same property are next to each other in class and object definitions.","Make sure object literals are declared consistently (defaults to explicit definitions).","Use static Response methods instead of new Response() constructor when possible.","Make sure switch-case statements are exhaustive.","Make sure the `preconnect` attribute is used when using Google Fonts.","Use `Array#{indexOf,lastIndexOf}()` instead of `Array#{findIndex,findLastIndex}()` when looking for the index of an item.","Make sure iterable callbacks return consistent values.",'Use `with { type: "json" }` for JSON module imports.',"Use numeric separators in numeric literals.","Use object spread instead of `Object.assign()` when constructing new objects.","Always use the radix argument when using `parseInt()`.","Make sure JSDoc comment lines start with a single asterisk, except for the first one.","Include a description parameter for `Symbol()`.","Don't use spread (`...`) syntax on accumulators.","Don't use the `delete` operator.","Don't access namespace imports dynamically.","Don't use namespace imports.","Declare regex literals at the top level.",'Don\'t use `target="_blank"` without `rel="noopener"`.'],Ye=["Don't use TypeScript enums.","Don't export imported variables.","Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions.","Don't use TypeScript namespaces.","Don't use non-null assertions with the `!` postfix operator.","Don't use parameter properties in class constructors.","Don't use user-defined types.","Use `as const` instead of literal types and type annotations.","Use either `T[]` or `Array<T>` consistently.","Initialize each enum member value explicitly.","Use `export type` for types.","Use `import type` for types.","Make sure all enum members are literal values.","Don't use TypeScript const enum.","Don't declare empty interfaces.","Don't let variables evolve into any type through reassignments.","Don't use the any type.","Don't misuse the non-null assertion operator (!) in TypeScript files.","Don't use implicit any type on variable declarations.","Don't merge interfaces and classes unsafely.","Don't use overload signatures that aren't next to each other.","Use the namespace keyword instead of the module keyword to declare TypeScript namespaces."],Ze=["Don't use global `eval()`.","Don't use callbacks in asynchronous tests and hooks.","Don't use negation in `if` statements that have `else` clauses.","Don't use nested ternary expressions.","Don't reassign function parameters.","This rule lets you specify global variable names you don't want to use in your application.","Don't use specified modules when loaded by import or require.","Don't use constants whose value is the upper-case version of their name.","Use `String.slice()` instead of `String.substr()` and `String.substring()`.","Don't use template literals if you don't need interpolation or special-character handling.","Don't use `else` blocks when the `if` block breaks early.","Don't use yoda expressions.","Don't use Array constructors.","Use `at()` instead of integer index access.","Follow curly brace conventions.","Use `else if` instead of nested `if` statements in `else` clauses.","Use single `if` statements instead of nested `if` clauses.","Use `new` for all builtins except `String`, `Number`, and `Boolean`.","Use consistent accessibility modifiers on class properties and methods.","Use `const` declarations for variables that are only assigned once.","Put default function parameters and optional function parameters last.","Include a `default` clause in switch statements.","Use the `**` operator instead of `Math.pow`.","Use `for-of` loops when you need the index to extract an item from the iterated array.","Use `node:assert/strict` over `node:assert`.","Use the `node:` protocol for Node.js builtin modules.","Use Number properties instead of global ones.","Use assignment operator shorthand where possible.","Use function types instead of object types with call signatures.","Use template literals over string concatenation.","Use `new` when throwing an error.","Don't throw non-Error values.","Use `String.trimStart()` and `String.trimEnd()` over `String.trimLeft()` and `String.trimRight()`.","Use standard constants instead of approximated literals.","Don't assign values in expressions.","Don't use async functions as Promise executors.","Don't reassign exceptions in catch clauses.","Don't reassign class members.","Don't compare against -0.","Don't use labeled statements that aren't loops.","Don't use void type outside of generic or return types.","Don't use console.","Don't use control characters and escape sequences that match control characters in regular expression literals.","Don't use debugger.","Don't assign directly to document.cookie.","Use `===` and `!==`.","Don't use duplicate case labels.","Don't use duplicate class members.","Don't use duplicate conditions in if-else-if chains.","Don't use two keys with the same name inside objects.","Don't use duplicate function parameter names.","Don't have duplicate hooks in describe blocks.","Don't use empty block statements and static blocks.","Don't let switch clauses fall through.","Don't reassign function declarations.","Don't allow assignments to native objects and read-only global variables.","Use Number.isFinite instead of global isFinite.","Use Number.isNaN instead of global isNaN.","Don't assign to imported bindings.","Don't use irregular whitespace characters.","Don't use labels that share a name with a variable.","Don't use characters made with multiple code points in character class syntax.","Make sure to use new and constructor properly.","Don't use shorthand assign when the variable appears on both sides.","Don't use octal escape sequences in string literals.","Don't use Object.prototype builtins directly.","Don't redeclare variables, functions, classes, and types in the same scope.",`Don't have redundant "use strict".`,"Don't compare things where both sides are exactly the same.","Don't let identifiers shadow restricted names.","Don't use sparse arrays (arrays with holes).","Don't use template literal placeholder syntax in regular strings.","Don't use the then property.","Don't use unsafe negation.","Don't use var.","Don't use with statements in non-strict contexts.","Make sure async functions actually use await.","Make sure default clauses in switch statements come last.","Make sure to pass a message value when creating a built-in error.","Make sure get methods always return a value.","Use a recommended display strategy with Google Fonts.","Make sure for-in loops include an if statement.","Use Array.isArray() instead of instanceof Array.","Make sure to use the digits argument with Number#toFixed().",'Make sure to use the "use strict" directive in script files.'],Xe=["Don't use `<img>` elements in Next.js projects.","Don't use `<head>` elements in Next.js projects.","Don't import next/document outside of pages/_document.jsx in Next.js projects.","Don't use the next/head module in pages/_document.js on Next.js projects."],Qe=["Don't use export or module.exports in test files.","Don't use focused tests.","Make sure the assertion function, like expect, is placed inside an it() function call.","Don't use disabled tests."],Vn=[...He,...Ve,...Ke,...Ge,...Ye,...Ze,...Xe,...Qe],p=`# Project Context
3
3
  Ultracite enforces strict type safety, accessibility standards, and consistent code quality for JavaScript/TypeScript projects using Biome's lightning-fast formatter and linter.
4
4
 
5
5
  ## Key Principles
@@ -76,7 +76,7 @@ globs: "**/*.{ts,tsx,js,jsx}"
76
76
  alwaysApply: true
77
77
  ---
78
78
 
79
- ${p}`,$={exists:()=>i(ue),create:async()=>{await it(".cursor/rules",{recursive:!0}),await rt(ue,ms)},update:async()=>{await it(".cursor/rules",{recursive:!0}),await rt(ue,p)}}});var pt={};d(pt,{eslintCleanup:()=>W});import{execSync as fs}from"child_process";import{unlink as gs}from"fs/promises";import{readFile as ct,writeFile as hs}from"fs/promises";import{parse as lt}from"jsonc-parser";var ut,dt,ys,ws,bs,vs,ks,W,pe=l(()=>{"use strict";f();ut=[".eslintrc",".eslintrc.js",".eslintrc.json",".eslintrc.yml",".eslintrc.yaml",".eslintrc.config.js","eslint.config.js","eslint.config.mjs","eslint.config.cjs",".eslintignore"],dt=async()=>{try{let e=await ct("package.json","utf-8"),t=lt(e);if(!t||typeof t!="object")return[];let s=t.dependencies||{},n=t.devDependencies||{},o={...s,...n};return Object.keys(o).filter(r=>r.startsWith("eslint")||r==="@eslint/js"||r==="@typescript-eslint/parser"||r==="@typescript-eslint/eslint-plugin")}catch{return[]}},ys=(e,t)=>{if(t.length===0)return;let s=t.join(" ");try{fs(`${e} ${s}`,{stdio:"pipe"})}catch{}},ws=async()=>{let e=[];for(let t of ut)if(await i(t))try{await gs(t),e.push(t)}catch{}return e},bs=async()=>{let e="./.vscode/settings.json";if(!await i(e))return!1;try{let t=await ct(e,"utf-8"),s=lt(t);if(!s||typeof s!="object")return!1;let n=!1,o={...s},r=["eslint.enable","eslint.format.enable","eslint.validate","eslint.workingDirectories","eslint.codeAction.showDocumentation","eslint.run","eslint.autoFixOnSave","eslint.quiet","eslint.packageManager","eslint.options","eslint.trace.server"];for(let c of r)c in o&&(delete o[c],n=!0);if("editor.codeActionsOnSave"in o){let c=o["editor.codeActionsOnSave"];if(c&&typeof c=="object"){let a=["source.fixAll.eslint","source.organizeImports.eslint"];for(let m of a)m in c&&(delete c[m],n=!0);Object.keys(c).length===0&&delete o["editor.codeActionsOnSave"]}}return n?(await hs(e,JSON.stringify(o,null,2)),!0):!1}catch{return!1}},vs=async()=>{if((await dt()).length>0)return!0;for(let t of ut)if(await i(t))return!0;return!1},ks=e=>e.startsWith("npm")?"npm uninstall":e.startsWith("yarn")?"yarn remove":e.startsWith("pnpm")?"pnpm remove":e.startsWith("bun")?"bun remove":"npm uninstall",W={hasESLint:vs,remove:async e=>{let t=await dt(),s=ks(e);ys(s,t);let n=await ws(),o=await bs();return{packagesRemoved:t,filesRemoved:n,vsCodeCleaned:o}}}});var gt={};d(gt,{husky:()=>k});import{execSync as xs}from"child_process";import{mkdir as Ds,readFile as js,writeFile as mt}from"fs/promises";var ft,L,k,me=l(()=>{"use strict";f();ft="npx ultracite format",L="./.husky/pre-commit",k={exists:()=>i(L),install:e=>{xs(`${e} -D husky`)},create:async()=>{await Ds(".husky",{recursive:!0}),await mt(L,ft)},update:async()=>{let e=await js(L,"utf-8");await mt(L,`${e}
79
+ ${p}`,$={exists:()=>i(ue),create:async()=>{await it(".cursor/rules",{recursive:!0}),await rt(ue,ms)},update:async()=>{await it(".cursor/rules",{recursive:!0}),await rt(ue,p)}}});var pt={};d(pt,{eslintCleanup:()=>W});import{execSync as fs}from"child_process";import{readFile as ct,unlink as gs,writeFile as hs}from"fs/promises";import{parse as lt}from"jsonc-parser";var ut,dt,ys,ws,bs,vs,ks,W,pe=l(()=>{"use strict";f();ut=[".eslintrc",".eslintrc.js",".eslintrc.json",".eslintrc.yml",".eslintrc.yaml",".eslintrc.config.js","eslint.config.js","eslint.config.mjs","eslint.config.cjs",".eslintignore"],dt=async()=>{try{let e=await ct("package.json","utf-8"),t=lt(e);if(!t||typeof t!="object")return[];let s=t.dependencies||{},n=t.devDependencies||{},o={...s,...n};return Object.keys(o).filter(r=>r.startsWith("eslint")||r.startsWith("@eslint/")||r==="@typescript-eslint/parser"||r==="@typescript-eslint/eslint-plugin")}catch{return[]}},ys=(e,t)=>{if(t.length===0)return;let s=t.join(" ");try{fs(`${e} ${s}`,{stdio:"pipe"})}catch{}},ws=async()=>{let e=[];for(let t of ut)if(await i(t))try{await gs(t),e.push(t)}catch{}return e},bs=async()=>{let e="./.vscode/settings.json";if(!await i(e))return!1;try{let t=await ct(e,"utf-8"),s=lt(t);if(!s||typeof s!="object")return!1;let n=!1,o={...s},r=["eslint.enable","eslint.format.enable","eslint.validate","eslint.workingDirectories","eslint.codeAction.showDocumentation","eslint.run","eslint.autoFixOnSave","eslint.quiet","eslint.packageManager","eslint.options","eslint.trace.server"];for(let c of r)c in o&&(delete o[c],n=!0);if("editor.codeActionsOnSave"in o){let c=o["editor.codeActionsOnSave"];if(c&&typeof c=="object"){let a=["source.fixAll.eslint","source.organizeImports.eslint"];for(let m of a)m in c&&(delete c[m],n=!0);Object.keys(c).length===0&&delete o["editor.codeActionsOnSave"]}}return n?(await hs(e,JSON.stringify(o,null,2)),!0):!1}catch{return!1}},vs=async()=>{if((await dt()).length>0)return!0;for(let t of ut)if(await i(t))return!0;return!1},ks=e=>e.startsWith("npm")?"npm uninstall":e.startsWith("yarn")?"yarn remove":e.startsWith("pnpm")?"pnpm remove":e.startsWith("bun")?"bun remove":"npm uninstall",W={hasESLint:vs,remove:async e=>{let t=await dt(),s=ks(e);ys(s,t);let n=await ws(),o=await bs();return{packagesRemoved:t,filesRemoved:n,vsCodeCleaned:o}}}});var gt={};d(gt,{husky:()=>k});import{execSync as xs}from"child_process";import{mkdir as Ds,readFile as js,writeFile as mt}from"fs/promises";var ft,L,k,me=l(()=>{"use strict";f();ft="npx ultracite format",L="./.husky/pre-commit",k={exists:()=>i(L),install:e=>{xs(`${e} -D husky`)},create:async()=>{await Ds(".husky",{recursive:!0}),await mt(L,ft)},update:async()=>{let e=await js(L,"utf-8");await mt(L,`${e}
80
80
  ${ft}`)}}});var bt={};d(bt,{kiro:()=>wt});import{mkdir as ht,writeFile as yt}from"fs/promises";var fe,wt,ge=l(()=>{"use strict";y();f();fe="./.kiro/steering/linting-and-formatting.md",wt={exists:()=>i(fe),create:async()=>{await ht(".kiro/steering",{recursive:!0}),await yt(fe,p)},update:async()=>{await ht(".kiro/steering",{recursive:!0}),await yt(fe,p)}}});var xt={};d(xt,{lefthook:()=>D});import{execSync as vt}from"child_process";import{readFile as Cs,writeFile as _}from"fs/promises";var q,x,kt,D,he=l(()=>{"use strict";f();q="npx ultracite format",x="./lefthook.yml",kt=`pre-commit:
81
81
  jobs:
82
82
  - run: ${q}
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": "5.1.6",
4
+ "version": "5.1.7",
5
5
  "bin": {
6
6
  "ultracite": "dist/index.js"
7
7
  },