Skip to content

Commit

Permalink
fix(configuration): update package and migrate new Biome release changes
Browse files Browse the repository at this point in the history
release-npm
  • Loading branch information
tobua committed Sep 17, 2024
1 parent fd3d2f2 commit 050f2b3
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 40 deletions.
5 changes: 5 additions & 0 deletions configuration/biome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const base = (configuration: object) =>
enabled: true,
rules: {
all: true,
correctness: {
useImportExtensions: 'off', // Always handled by bundler or runtime.
},
},
},
javascript: {
Expand Down Expand Up @@ -72,6 +75,7 @@ export const templates = {
},
suspicious: {
noConsoleLog: 'off',
noConsole: 'off',
noExplicitAny: 'off',
noSkippedTests: 'off',
noEmptyBlockStatements: 'off',
Expand All @@ -95,6 +99,7 @@ export const templates = {
},
suspicious: {
noConsoleLog: 'off',
noConsole: 'off',
},
correctness: {
noNodejsModules: 'off',
Expand Down
2 changes: 1 addition & 1 deletion configuration/prettier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function createFile(configuration: Record<string, any>) {
},
]

if (Array.isArray(ignores) && ignores.length) {
if (Array.isArray(ignores) && ignores.length > 0) {
files.push({ name: '.prettierignore', contents: ignores.join('\n') })
}

Expand Down
4 changes: 2 additions & 2 deletions helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export async function findConfiguration() {
const userConfiguration = multipleConfigurations
? // Merge package configuration onto file configuration.
merge(moduleContents as object, state.packageJson.configuration as object)
: state.packageJson.configuration ?? (moduleContents as object)
: (state.packageJson.configuration ?? (moduleContents as object))

validate(userConfiguration)
state.options = userConfiguration
Expand All @@ -79,7 +79,7 @@ async function addAdditionalGitignoreEntries(file: { name: string; contents: str
}
}

if (addedIgnores.length) {
if (addedIgnores.length > 0) {
await Bun.write(
root(file.name),
`${existingFileContents}${existingFileContents.endsWith('\n') ? '' : '\n'}${addedIgnores.join('\n')}\n`,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@types/bun": "^1.1.6",
"@biomejs/biome": "^1.9.1",
"@types/bun": "^1.1.9",
"@types/parse-gitignore": "^1.0.2",
"eslint-config-airbnb": "^19.0.4",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"peerDependencies": {
"typescript": ">= 5"
Expand Down
12 changes: 6 additions & 6 deletions template/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"watch": "bun build index.tsx --outdir public --watch"
},
"dependencies": {
"@biomejs/biome": "^1.8.3",
"@elysiajs/static": "^1.1.0",
"@types/react": "^18.3.4",
"@biomejs/biome": "^1.9.1",
"@elysiajs/static": "^1.1.1",
"@types/react": "^18.3.7",
"@types/react-dom": "^18.3.0",
"elysia": "^1.1.7",
"elysia": "^1.1.12",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.5.4",
"zero-configuration": "^0.17.2"
"typescript": "^5.6.2",
"zero-configuration": "^0.17.3"
},
"trustedDependencies": [
"zero-configuration"
Expand Down
18 changes: 9 additions & 9 deletions template/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
}
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@playwright/test": "^1.46.1",
"@rsbuild/core": "^1.0.1-beta.15",
"@rsbuild/plugin-react": "^1.0.1-beta.15",
"@biomejs/biome": "^1.9.1",
"@playwright/test": "^1.47.1",
"@rsbuild/core": "^1.0.4",
"@rsbuild/plugin-react": "^1.0.2",
"@types/react": "^18",
"@types/react-dom": "^18",
"electron": "^32.0.1",
"electron-builder": "^24.13.3",
"playwright": "^1.46.1",
"electron": "^32.1.0",
"electron-builder": "^25.0.5",
"playwright": "^1.47.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.5.4",
"zero-configuration": "^0.17.2"
"typescript": "^5.6.2",
"zero-configuration": "^0.17.3"
},
"trustedDependencies": [
"zero-configuration",
Expand Down
12 changes: 6 additions & 6 deletions template/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
},
"dependencies": {
"react": "^18.3.1",
"react-native": "^0.75.2"
"react-native": "^0.75.3"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/react": "^18.3.4",
"@types/jest": "^29.5.13",
"@types/react": "^18.3.7",
"@types/react-native": "^0.73.0",
"@types/react-test-renderer": "^18.3.0",
"android-sdk-numic-plugin": "^1.0.6",
"babel-jest": "^29.7.0",
"icon-numic-plugin": "^1.4.4",
"jest": "^29.7.0",
"numic": "^2.4.1",
"numic": "^3.0.1",
"react-test-renderer": "^18.3.1",
"typescript": "^5.5.4",
"zero-configuration": "^0.17.2"
"typescript": "^5.6.2",
"zero-configuration": "^0.17.3"
},
"trustedDependencies": [
"zero-configuration",
Expand Down
6 changes: 3 additions & 3 deletions template/plugin-bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"types": "tsc"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"typescript": "^5.5.4",
"zero-configuration": "^0.17.2"
"@biomejs/biome": "^1.9.1",
"typescript": "^5.6.2",
"zero-configuration": "^0.17.3"
},
"peerDependencies": {
"typescript": ">= 5"
Expand Down
8 changes: 4 additions & 4 deletions template/plugin-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"types": "tsc"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@types/react": "^18.3.4",
"typescript": "^5.5.4",
"zero-configuration": "^0.17.2"
"@biomejs/biome": "^1.9.1",
"@types/react": "^18.3.7",
"typescript": "^5.6.2",
"zero-configuration": "^0.17.3"
},
"peerDependencies": {
"react": ">= 18",
Expand Down
12 changes: 6 additions & 6 deletions template/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"types": "tsc"
},
"dependencies": {
"@biomejs/biome": "^1.8.3",
"@rsbuild/core": "^1.0.1-beta.15",
"@rsbuild/plugin-react": "^1.0.1-beta.15",
"@types/react": "^18.3.4",
"@biomejs/biome": "^1.9.1",
"@rsbuild/core": "^1.0.4",
"@rsbuild/plugin-react": "^1.0.2",
"@types/react": "^18.3.7",
"@types/react-dom": "^18.3.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.5.4",
"zero-configuration": "^0.17.2"
"typescript": "^5.6.2",
"zero-configuration": "^0.17.3"
},
"trustedDependencies": [
"zero-configuration"
Expand Down

0 comments on commit 050f2b3

Please sign in to comment.