Skip to content

Commit f44bec7

Browse files
committed
refactor: reorganize imports and improve code readability across components and libraries
- Reordered and grouped imports in Editable.tsx for better clarity. - Simplified function definitions and removed unnecessary line breaks. - Enhanced markdown parsing in parseIssue.ts to handle case insensitivity and BOM. - Improved PDF generation logic in generatePdf.ts for cleaner code. - Added unit tests for parseIssue function to ensure proper markdown parsing. - Updated Vite configuration to include test environment settings. - Introduced Biome configuration for code formatting and linting. - Cleaned up CSS styles for consistency and readability.
1 parent 35f055e commit f44bec7

File tree

15 files changed

+741
-549
lines changed

15 files changed

+741
-549
lines changed

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"biome.enabled": true,
3+
"biome.configurationPath": "biome.json",
4+
"biome.runFromTemporaryLocation": false,
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.biome": "explicit",
7+
"source.organizeImports.biome": "explicit"
8+
},
9+
"biome.requireConfiguration": true,
10+
"locust.autoSetup": "never"
11+
}

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ pnpm build
6060

6161
Runs TypeScript type checking (`tsc --noEmit`) followed by `vite build`. Output goes to `dist/`.
6262

63+
### Test
64+
65+
```sh
66+
pnpm test
67+
```
68+
69+
Runs unit tests with Vitest.
70+
6371
### Preview Production Build
6472

6573
```sh

biome.json

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

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc --noEmit && vite build",
9-
"preview": "vite preview"
9+
"lint": "biome check --write .",
10+
"preview": "vite preview",
11+
"test": "vitest run",
12+
"test:watch": "vitest"
1013
},
1114
"dependencies": {
1215
"docx": "^9.1.1",
@@ -21,11 +24,13 @@
2124
"react-dom": "^18.3.1"
2225
},
2326
"devDependencies": {
27+
"@biomejs/biome": "^2.4.10",
2428
"@types/file-saver": "^2.0.7",
2529
"@types/react": "^18.3.12",
2630
"@types/react-dom": "^18.3.1",
2731
"@vitejs/plugin-react": "^4.3.4",
2832
"typescript": "^5.7.0",
29-
"vite": "^6.0.0"
33+
"vite": "^6.0.0",
34+
"vitest": "^4.1.2"
3035
}
3136
}

0 commit comments

Comments
 (0)