feat(prettier): add Prettier configuration for JSON sorting and update package scripts for i18n checks

This commit is contained in:
Kang committed 2026-04-11 00:01:54 +08:00
1 parent c63febc953
commit 4d4703114a
5 files changed
+1409 -1347

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
{
"plugins": ["prettier-plugin-sort-json"],
"overrides": [
{
"files": "src/i18n/locales/*.json",
"options": {
"jsonRecursiveSort": true,
"jsonSortOrder": "{\"/.*/\": \"lexical\"}"
}
}
]
}
+6 -1
View File
@@ -21,7 +21,10 @@
"preview": "vite preview",
"tauri": "tauri",
"lint": "biome check src/",
"format": "biome check --write src/"
"format": "biome check --write src/",
"format:check": "biome check --check src/",
"i18n:check": "prettier --check src/i18n/locales/*.json",
"i18n:fix": "prettier --write src/i18n/locales/*.json"
},
"dependencies": {
"@fontsource-variable/noto-sans-sc": "^5.2.10",
@@ -59,6 +62,8 @@
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.6.0",
"prettier": "^3.8.2",
"prettier-plugin-sort-json": "^4.2.0",
"shadcn": "^3.8.5",
"tailwindcss": "^4.1.18",
"tw-animate-css": "^1.4.0",
+23
View File
@@ -108,6 +108,12 @@ importers:
'@vitejs/plugin-react':
specifier: ^4.6.0
version: 4.7.0(vite@7.3.1(@types/node@25.3.0)(jiti@2.6.1)(lightningcss@1.30.2))
prettier:
specifier: ^3.8.2
version: 3.8.2
prettier-plugin-sort-json:
specifier: ^4.2.0
version: 4.2.0(prettier@3.8.2)
shadcn:
specifier: ^3.8.5
version: 3.8.5(@types/node@25.3.0)(typescript@5.8.3)
@@ -2647,6 +2653,17 @@ packages:
resolution: {integrity: sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==}
engines: {node: '>=20'}
prettier-plugin-sort-json@4.2.0:
resolution: {integrity: sha512-jK1w3/7otTvHtv1eoLji2U9mEoOGeyl7QQQ/afLnjht1YtRLSUUk8o0rIIC/HUVXhoGPCFe4SVZbRGYjjUVgvA==}
engines: {node: '>=18.0.0'}
peerDependencies:
prettier: ^3.0.0
prettier@3.8.2:
resolution: {integrity: sha512-8c3mgTe0ASwWAJK+78dpviD+A8EqhndQPUBpNUIPt6+xWlIigCwfN01lWr9MAede4uqXGTEKeQWTvzb3vjia0Q==}
engines: {node: '>=14'}
hasBin: true
pretty-ms@9.3.0:
resolution: {integrity: sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==}
engines: {node: '>=18'}
@@ -5511,6 +5528,12 @@ snapshots:
powershell-utils@0.1.0: {}
prettier-plugin-sort-json@4.2.0(prettier@3.8.2):
dependencies:
prettier: 3.8.2
prettier@3.8.2: {}
pretty-ms@9.3.0:
dependencies:
parse-ms: 4.0.0
+684 -666
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff