Skip to content

Commit b683865

Browse files
committed
Unify code style
(cherry picked from commit b61edc0)
1 parent 5bf8b1f commit b683865

File tree

5 files changed

+83
-7
lines changed

5 files changed

+83
-7
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{js,jsx,ts,tsx,json}]
10+
indent_style = space
11+
indent_size = 2
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

frontend/.eslintrc.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"extends": [
3-
"next/core-web-vitals",
4-
"next/typescript"
5-
]
2+
"extends": ["next/core-web-vitals", "next/typescript", "prettier"],
3+
"plugins": ["prettier"],
4+
"rules": {
5+
"prettier/prettier": "error"
6+
}
67
}

frontend/.prettierignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
.next/
6+
out/
7+
dist/
8+
build/
9+
10+
# Environment files
11+
.env*
12+
13+
# Logs
14+
*.log
15+
16+
# Package manager files
17+
package-lock.json
18+
yarn.lock
19+
pnpm-lock.yaml
20+
21+
# IDE files
22+
.vscode/
23+
.idea/
24+
25+
# OS files
26+
.DS_Store
27+
Thumbs.db
28+
29+
# Generated files
30+
*.d.ts
31+
!src/**/*.d.ts
32+
33+
# Public assets (usually don't need formatting)
34+
public/
35+
36+
# Config files that should maintain specific formatting
37+
tailwind.config.*
38+
next.config.*
39+
postcss.config.*

frontend/.prettierrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": false,
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"bracketSpacing": true,
9+
"bracketSameLine": false,
10+
"arrowParens": "always",
11+
"endOfLine": "auto",
12+
"jsxSingleQuote": false,
13+
"htmlWhitespaceSensitivity": "css",
14+
"proseWrap": "preserve",
15+
"quoteProps": "as-needed"
16+
}

frontend/package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
"build": "next build",
88
"start": "NODE_ENV=production node server.js",
99
"lint": "next lint",
10+
"lint:fix": "next lint --fix",
11+
"format": "prettier --write .",
12+
"format:check": "prettier --check .",
1013
"type-check": "tsc --noEmit",
11-
"check-all": "npm run type-check && npm run lint && npm run build"
14+
"check-all": "npm run type-check && npm run lint && npm run format:check && npm run build"
1215
},
1316
"dependencies": {
1417
"@ant-design/icons": "^6.0.0",
@@ -61,7 +64,7 @@
6164
"katex": "^0.16.11",
6265
"lucide-react": "^0.454.0",
6366
"mermaid": "^11.12.0",
64-
"next": "15.5.7",
67+
"next": "^15.5.9",
6568
"next-i18next": "^15.4.2",
6669
"next-themes": "^0.4.4",
6770
"react": "18.2.0",
@@ -75,7 +78,7 @@
7578
"react-markdown": "^8.0.7",
7679
"react-organizational-chart": "^2.2.1",
7780
"react-resizable-panels": "^2.1.7",
78-
"react-syntax-highlighter": "^15.5.0",
81+
"react-syntax-highlighter": "^16.1.0",
7982
"reactflow": "^11.11.4",
8083
"recharts": "2.15.0",
8184
"rehype-katex": "^6.0.3",
@@ -98,7 +101,10 @@
98101
"@types/react-dom": "18.3.6",
99102
"eslint": "^9.34.0",
100103
"eslint-config-next": "15.5.7",
104+
"eslint-config-prettier": "^9.1.0",
105+
"eslint-plugin-prettier": "^5.1.3",
101106
"postcss": "^8",
107+
"prettier": "^3.2.5",
102108
"tailwindcss": "^3.4.17",
103109
"typescript": "5.8.3"
104110
}

0 commit comments

Comments
 (0)