chore: updated biome initialization
a66e4990
Fixes [bhvr#45](https://github.com/stevedylandev/bhvr/issues/45) by replacing hard coded config and using `bunx @biome-js/biome init` instead
1 file(s) · +1 −19
Fixes [bhvr#45](https://github.com/stevedylandev/bhvr/issues/45) by replacing hard coded config and using `bunx @biome-js/biome init` instead
| 34 | 34 | ||
| 35 | 35 | // Create biome.json in the root of the project |
|
| 36 | 36 | spinner.text = "Creating biome.json..."; |
|
| 37 | - | const biomeConfig = { |
|
| 38 | - | $schema: "https://biomejs.dev/schemas/2.2.4/schema.json", |
|
| 39 | - | vcs: { |
|
| 40 | - | enabled: true, |
|
| 41 | - | clientKind: "git", |
|
| 42 | - | useIgnoreFile: true, |
|
| 43 | - | }, |
|
| 44 | - | files: { ignoreUnknown: false, ignore: [] }, |
|
| 45 | - | formatter: { enabled: true }, |
|
| 46 | - | organizeImports: { enabled: true }, |
|
| 47 | - | linter: { |
|
| 48 | - | enabled: true, |
|
| 49 | - | rules: { |
|
| 50 | - | recommended: true, |
|
| 51 | - | }, |
|
| 52 | - | }, |
|
| 53 | - | }; |
|
| 54 | - | const biomeConfigPath = path.join(projectPath, "biome.json"); |
|
| 55 | - | await fs.writeJson(biomeConfigPath, biomeConfig, { spaces: 2 }); |
|
| 37 | + | await execa("bunx", ["@biome-js/biome", "init"], { cwd: projectPath }); |
|
| 56 | 38 | ||
| 57 | 39 | // Update client package.json scripts to remove lint |
|
| 58 | 40 | spinner.text = "Updating scripts in client/package.json..."; |