Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"organizeImports": {
"enabled": true
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"vcs": {
"enabled": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
]
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@biomejs/biome": "^2.0.0",
"@clack/prompts": "^0.11.0",
"@microsoft/api-extractor": "^7.52.8",
"@rslib/core": "0.9.1",
Expand Down
76 changes: 38 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import fs from 'node:fs';
import path from 'node:path';
import { dirname } from 'node:path';
import path, { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import {
cancel,
Expand Down Expand Up @@ -285,12 +284,16 @@ export async function create({
if (tool === 'biome') {
const packageJson = await readPackageJson(distFolder);
let biomeVersion: string =
packageJson.devDependencies?.['@biomejs/biome'] ?? '1.9.4';
packageJson.devDependencies?.['@biomejs/biome'] ?? '2.0.0';

biomeVersion = biomeVersion.replace(/\^/, '');

const biomeJsonTemplatePath = path.join(
distFolder,
'biome.json.template',
);
const biomeJsonPath = path.join(distFolder, 'biome.json');
const biomeJson = await readJSON(biomeJsonPath);
const biomeJson = await readJSON(biomeJsonTemplatePath);

biomeJson.$schema = biomeJson.$schema.replace('{version}', biomeVersion);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"$schema": "https://biomejs.dev/schemas/{version}/schema.json",
"organizeImports": {
"enabled": true
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"vcs": {
"enabled": true,
Expand Down
2 changes: 1 addition & 1 deletion template-biome/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"format": "biome format --write"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4"
"@biomejs/biome": "^2.0.0"
}
}
2 changes: 1 addition & 1 deletion template-eslint/react-js/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { fixupConfigRules } from '@eslint/compat';
import js from '@eslint/js';
import reactHooks from 'eslint-plugin-react-hooks';
import reactJsx from 'eslint-plugin-react/configs/jsx-runtime.js';
import react from 'eslint-plugin-react/configs/recommended.js';
import reactHooks from 'eslint-plugin-react-hooks';
import globals from 'globals';

export default [
Expand Down
2 changes: 1 addition & 1 deletion template-eslint/react-ts/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { fixupConfigRules } from '@eslint/compat';
import js from '@eslint/js';
import reactHooks from 'eslint-plugin-react-hooks';
import reactJsx from 'eslint-plugin-react/configs/jsx-runtime.js';
import react from 'eslint-plugin-react/configs/recommended.js';
import reactHooks from 'eslint-plugin-react-hooks';
import globals from 'globals';
import ts from 'typescript-eslint';

Expand Down
2 changes: 1 addition & 1 deletion template-eslint/vue-js/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import js from '@eslint/js';
import pluginVue from 'eslint-plugin-vue';
import { defineConfig, globalIgnores } from 'eslint/config';
import pluginVue from 'eslint-plugin-vue';
import globals from 'globals';

export default defineConfig([
Expand Down
2 changes: 1 addition & 1 deletion template-eslint/vue-ts/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {
defineConfigWithVueTs,
vueTsConfigs,
} from '@vue/eslint-config-typescript';
import pluginVue from 'eslint-plugin-vue';
import { globalIgnores } from 'eslint/config';
import pluginVue from 'eslint-plugin-vue';
import globals from 'globals';

// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
Expand Down