Skip to content

Commit 7263395

Browse files
authored
Update infra (#57)
1. Replace ESLint and Prettier with Biome 2. Use rolldown-vite ```release-note None ```
1 parent 9f9f1eb commit 7263395

23 files changed

+1417
-1372
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lint-staged

biome.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"includes": ["**", "!**/generated/**"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2
16+
},
17+
"linter": {
18+
"enabled": true,
19+
"rules": {
20+
"recommended": true
21+
}
22+
},
23+
"javascript": {
24+
"formatter": {
25+
"quoteStyle": "single",
26+
"trailingCommas": "es5"
27+
}
28+
},
29+
"assist": {
30+
"enabled": true,
31+
"actions": {
32+
"source": {
33+
"organizeImports": "on"
34+
}
35+
}
36+
}
37+
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ node {
3232
}
3333

3434
tasks.register('buildFrontend', PnpmTask) {
35-
args = ['build:packages']
35+
args = ['build']
3636
dependsOn('installDepsForUI')
3737
}
3838

@@ -48,5 +48,5 @@ build {
4848
}
4949

5050
halo {
51-
version = "2.20"
51+
version = "2.21"
5252
}

package.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"license": "GPL-3.0",
33
"author": {
4-
"name": "Halo OSS Team",
4+
"name": "Halo",
55
"url": "https://github.com/halo-dev"
66
},
77
"contributors": [
@@ -12,19 +12,30 @@
1212
}
1313
],
1414
"scripts": {
15-
"build:packages": "pnpm --filter \"./packages/**\" build",
16-
"example:dev": "pnpm --filter \"./packages/search-widget\" dev",
17-
"release:packages": "pnpm --filter \"./packages/**\" release"
15+
"build": "pnpm -r run build",
16+
"check": "biome check --write",
17+
"example:dev": "pnpm -C packages/search-widget dev",
18+
"prepare": "husky",
19+
"release:packages": "pnpm -r run release"
20+
},
21+
"lint-staged": {
22+
"*": [
23+
"biome check --no-errors-on-unmatched --files-ignore-unknown=true"
24+
]
1825
},
1926
"devDependencies": {
27+
"@biomejs/biome": "^2.1.2",
2028
"@halo-dev/api-client": "2.17.0",
2129
"@rushstack/eslint-patch": "^1.10.4",
2230
"@types/node": "^18.19.43",
2331
"@typescript-eslint/eslint-plugin": "^6.21.0",
2432
"@typescript-eslint/parser": "^6.21.0",
2533
"eslint": "^8.57.0",
34+
"husky": "^9.1.7",
35+
"lint-staged": "^16.1.2",
2636
"prettier": "^2.8.8",
2737
"typescript": "^5.5.4",
28-
"vite": "^5.3.5"
29-
}
38+
"vite": "npm:[email protected]"
39+
},
40+
"packageManager": "[email protected]+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39"
3041
}

packages/search-widget/.eslintrc.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

packages/search-widget/.gitignore

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/search-widget/.prettierrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/lit/lit/main/packages/localize-tools/config.schema.json",
3-
"sourceLocale": "en",
4-
"targetLocales": [
5-
"es",
6-
"zh-CN",
7-
"zh-TW"
8-
],
9-
"tsConfig": "./tsconfig.json",
10-
"output": {
11-
"mode": "runtime",
12-
"outputDir": "./src/generated/locales",
13-
"localeCodesModule": "./src/generated/locale-codes.ts"
14-
},
15-
"interchange": {
16-
"format": "xliff",
17-
"xliffDir": "./xliff/"
18-
}
19-
}
2+
"$schema": "https://raw.githubusercontent.com/lit/lit/main/packages/localize-tools/config.schema.json",
3+
"sourceLocale": "en",
4+
"targetLocales": ["es", "zh-CN", "zh-TW"],
5+
"tsConfig": "./tsconfig.json",
6+
"output": {
7+
"mode": "runtime",
8+
"outputDir": "./src/generated/locales",
9+
"localeCodesModule": "./src/generated/locale-codes.ts"
10+
},
11+
"interchange": {
12+
"format": "xliff",
13+
"xliffDir": "./xliff/"
14+
}
15+
}

packages/search-widget/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,18 @@
2424
},
2525
"dependencies": {
2626
"@lit/localize": "^0.12.2",
27+
"es-toolkit": "^1.39.7",
2728
"lit": "^3.2.0",
28-
"lodash-es": "^4.17.21",
2929
"overlayscrollbars": "^2.10.0"
3030
},
3131
"devDependencies": {
3232
"@iconify/json": "^2.2.234",
33-
"@julr/unocss-preset-forms": "^0.1.0",
33+
"@julr/unocss-preset-forms": "^2.0.0",
3434
"@lit/localize-tools": "^0.8.0",
35-
"@types/lodash-es": "^4.17.12",
36-
"@unocss/eslint-config": "^0.61.9",
37-
"@unocss/reset": "^0.61.9",
35+
"@unocss/reset": "^66.3.3",
3836
"lit-analyzer": "^1.2.1",
39-
"unocss": "^0.61.9",
40-
"vite-plugin-dts": "4.0.0-beta.2"
37+
"unocss": "^66.3.3",
38+
"vite-plugin-dts": "4.0.0-beta.2",
39+
"vite": "npm:[email protected]"
4140
}
4241
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const HISTORY_KEY = 'halo:search-widgets:history:hits';
2-
export const MAX_HISTORY_ITEMS = 50;
2+
export const MAX_HISTORY_ITEMS = 50;

0 commit comments

Comments
 (0)