@@ -58,24 +58,13 @@ ${pc.cyan("Docs:")} ${pc.underline("https://turborepo.com/docs")}
5858 }
5959 const hasUltracite = addons . includes ( "ultracite" ) ;
6060 const hasBiome = addons . includes ( "biome" ) ;
61- const hasHusky = addons . includes ( "husky" ) ;
62- const hasOxlint = addons . includes ( "oxlint" ) ;
6361
6462 if ( hasUltracite ) {
65- await setupUltracite ( config , hasHusky ) ;
63+ await setupUltracite ( config ) ;
6664 } else {
6765 if ( hasBiome ) {
6866 await setupBiome ( projectDir ) ;
6967 }
70- if ( hasHusky ) {
71- let linter : "biome" | "oxlint" | undefined ;
72- if ( hasOxlint ) {
73- linter = "oxlint" ;
74- } else if ( hasBiome ) {
75- linter = "biome" ;
76- }
77- await setupHusky ( projectDir , linter ) ;
78- }
7968 }
8069
8170 if ( addons . includes ( "oxlint" ) ) {
@@ -123,39 +112,6 @@ export async function setupBiome(projectDir: string) {
123112 }
124113}
125114
126- export async function setupHusky ( projectDir : string , linter ?: "biome" | "oxlint" ) {
127- await addPackageDependency ( {
128- devDependencies : [ "husky" , "lint-staged" ] ,
129- projectDir,
130- } ) ;
131-
132- const packageJsonPath = path . join ( projectDir , "package.json" ) ;
133- if ( await fs . pathExists ( packageJsonPath ) ) {
134- const packageJson = await fs . readJson ( packageJsonPath ) ;
135-
136- packageJson . scripts = {
137- ...packageJson . scripts ,
138- prepare : "husky" ,
139- } ;
140-
141- if ( linter === "oxlint" ) {
142- packageJson [ "lint-staged" ] = {
143- "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,astro,svelte}" : "oxlint" ,
144- } ;
145- } else if ( linter === "biome" ) {
146- packageJson [ "lint-staged" ] = {
147- "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}" : [ "biome check --write ." ] ,
148- } ;
149- } else {
150- packageJson [ "lint-staged" ] = {
151- "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,astro,svelte}" : "" ,
152- } ;
153- }
154-
155- await fs . writeJson ( packageJsonPath , packageJson , { spaces : 2 } ) ;
156- }
157- }
158-
159115async function setupPwa ( projectDir : string , frontends : Frontend [ ] ) {
160116 const isCompatibleFrontend = frontends . some ( ( f ) =>
161117 [ "react-router" , "tanstack-router" , "solid" ] . includes ( f ) ,
0 commit comments