build: update all deps and migrate to biome

This commit is contained in:
Haoyu Xu
2025-10-04 02:11:24 +08:00
parent 43850d47ea
commit 5c9e9eba84
133 changed files with 834 additions and 1962 deletions

View File

@@ -1,3 +1 @@
dist
data
auto_update

View File

@@ -1,27 +0,0 @@
import { tsConfig } from '@aklive2d/eslint-config'
import tseslint from 'typescript-eslint'
import globals from 'globals'
/** @type {import('eslint').Config} */
export default tseslint.config(
...tsConfig,
{
ignores: ['dist', 'data'],
},
{
files: ['**/*.js', '**/*.ts'],
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.node,
},
},
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
},
}
)

View File

@@ -1,19 +1,19 @@
import path from 'node:path'
import { file } from '@aklive2d/libs'
import { githubDownload } from '@aklive2d/downloader'
import config from '@aklive2d/config'
import { githubDownload } from '@aklive2d/downloader'
import { file } from '@aklive2d/libs'
import operators, {
getOperatorId,
getOperatorAlternativeId,
getOperatorId,
OPERATOR_SOURCE_FOLDER,
} from '@aklive2d/operator'
import type {
Region,
CharwordTableJson,
OperatorCharwordTable,
CharwordTable,
VoiceRegionObject,
CharwordTableJson,
InfoRegionObject,
OperatorCharwordTable,
Region,
VoiceRegionObject,
} from './types.ts'
// zh_TW uses an older version of charword_table.json

View File

@@ -8,19 +8,16 @@
"@aklive2d/libs": "workspace:*",
"@aklive2d/config": "workspace:*",
"@aklive2d/downloader": "workspace:*",
"@aklive2d/operator": "workspace:*",
"@aklive2d/eslint-config": "workspace:*",
"@aklive2d/prettier-config": "workspace:*"
"@aklive2d/operator": "workspace:*"
},
"peerDependencies": {
"globals": ">=16.0.0",
"typescript-eslint": ">=8.31.1",
"typescript": ">=5.8.2"
"typescript": ">=5.9.3"
},
"scripts": {
"update": "mode=update bun runner.ts",
"build": "mode=build bun runner.ts",
"lint": "eslint && prettier --check .",
"lint": "biome lint --write .",
"lint:fix": "biome check --write .",
"build:cleanup": "rm -rf ./dist"
}
}
}

View File

@@ -1,11 +0,0 @@
import baseConfig from '@aklive2d/prettier-config'
/**
* @type {import("prettier").Config}
*/
const config = {
...baseConfig,
semi: false,
}
export default config

View File

@@ -1,5 +1,5 @@
import { build, update } from './index.ts'
import { envParser, error } from '@aklive2d/libs'
import { build, update } from './index.ts'
async function main() {
let err: string[] = []

View File

@@ -108,7 +108,6 @@ export type OperatorCharwordTable = {
}
export type VoiceRegionObject = {
// eslint-disable-next-line
[region in Region]: {
[wordkey: string]: {
[voiceId: string]: {
@@ -120,7 +119,6 @@ export type VoiceRegionObject = {
}
export type InfoRegionObject = {
// eslint-disable-next-line
[region in Region]: {
[wordkey: string]: {
[voiceLangType: string]: string[]