Skip to content

Commit b424c55

Browse files
authored
Enhance Code Consistency with Prettier Integration (#4)
1 parent c5ddc69 commit b424c55

File tree

11 files changed

+1170
-433
lines changed

11 files changed

+1170
-433
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
- name: Install dependencies
3131
run: pnpm install --no-frozen-lockfile
3232

33+
- name: Run Prettier
34+
run: pnpm exec prettier --check .
35+
3336
- name: Run ESLint
3437
run: pnpm run lint
3538

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
coverage
4+
build
5+
pnpm-lock.yaml

.prettierrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"semi": true,
23
"singleQuote": true,
3-
"trailingComma": "all"
4+
"trailingComma": "all",
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"arrowParens": "always",
8+
"endOfLine": "lf"
49
}

eslint.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
6-
import { defineConfig, globalIgnores } from 'eslint/config'
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import reactHooks from 'eslint-plugin-react-hooks';
4+
import reactRefresh from 'eslint-plugin-react-refresh';
5+
import tseslint from 'typescript-eslint';
6+
import { defineConfig, globalIgnores } from 'eslint/config';
77

88
export default defineConfig([
99
globalIgnores(['dist']),
@@ -20,4 +20,4 @@ export default defineConfig([
2020
globals: globals.browser,
2121
},
2222
},
23-
])
23+
]);

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "vite",
88
"build": "tsc -b && vite build",
99
"lint": "eslint .",
10-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"format": "prettier --write ."
1112
},
1213
"dependencies": {
1314
"react": "^19.1.1",
@@ -25,9 +26,15 @@
2526
"eslint-plugin-react-refresh": "^0.4.22",
2627
"globals": "^16.4.0",
2728
"postcss": "^8.5.6",
29+
"prettier": "^3.6.2",
2830
"tailwindcss": "^4.1.15",
2931
"typescript": "~5.9.3",
3032
"typescript-eslint": "^8.45.0",
3133
"vite": "^7.1.7"
34+
},
35+
"pnpm": {
36+
"onlyBuiltDependencies": [
37+
"esbuild"
38+
]
3239
}
3340
}

0 commit comments

Comments
 (0)