Skip to content

Commit 6059af3

Browse files
committed
refactor: standardize import statements and improve code formatting across components
- Updated import statements to use single quotes for consistency. - Reformatted JSX elements for better readability. - Adjusted text content formatting for improved clarity. - Enhanced button and theme hook implementations for better maintainability. - Refactored service descriptions and titles for consistency in string formatting. - Improved overall code structure and organization in various components.
1 parent 61b878e commit 6059af3

17 files changed

Lines changed: 868 additions & 180 deletions

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 80,
7+
"arrowParens": "avoid",
8+
"plugins": ["prettier-plugin-tailwindcss"]
9+
}

eslint.config.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import reactHooks from 'eslint-plugin-react-hooks'
44
import reactRefresh from 'eslint-plugin-react-refresh'
55
import tseslint from 'typescript-eslint'
66
import { defineConfig, globalIgnores } from 'eslint/config'
7+
import importX from 'eslint-plugin-import-x'
8+
import prettier from 'eslint-plugin-prettier'
9+
import prettierConfig from 'eslint-config-prettier'
710

811
export default defineConfig([
912
globalIgnores(['dist']),
@@ -19,5 +22,34 @@ export default defineConfig([
1922
ecmaVersion: 2020,
2023
globals: globals.browser,
2124
},
25+
plugins: {
26+
'import-x': importX,
27+
prettier: prettier,
28+
},
29+
rules: {
30+
...prettierConfig.rules,
31+
'prettier/prettier': 'error',
32+
'import-x/order': [
33+
'error',
34+
{
35+
groups: [
36+
'builtin',
37+
'external',
38+
'internal',
39+
['parent', 'sibling'],
40+
'index',
41+
'object',
42+
'type',
43+
],
44+
'newlines-between': 'always',
45+
alphabetize: {
46+
order: 'asc',
47+
caseInsensitive: true,
48+
},
49+
},
50+
],
51+
'import-x/newline-after-import': 'error',
52+
'import-x/no-duplicates': 'error',
53+
},
2254
},
2355
])

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"dev": "vite",
88
"build": "tsc -b && vite build",
99
"lint": "eslint .",
10+
"lint:fix": "eslint . --fix",
11+
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
12+
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
1013
"preview": "vite preview"
1114
},
1215
"dependencies": {
@@ -20,7 +23,9 @@
2023
"tailwindcss": "^4.1.18"
2124
},
2225
"pnpm": {
23-
"onlyBuiltDependencies": ["esbuild"]
26+
"onlyBuiltDependencies": [
27+
"esbuild"
28+
]
2429
},
2530
"devDependencies": {
2631
"@eslint/js": "^9.39.1",
@@ -29,9 +34,14 @@
2934
"@types/react-dom": "^19.2.3",
3035
"@vitejs/plugin-react": "^5.1.1",
3136
"eslint": "^9.39.1",
37+
"eslint-config-prettier": "^10.1.8",
38+
"eslint-plugin-import-x": "^4.16.1",
39+
"eslint-plugin-prettier": "^5.5.5",
3240
"eslint-plugin-react-hooks": "^7.0.1",
3341
"eslint-plugin-react-refresh": "^0.4.24",
3442
"globals": "^16.5.0",
43+
"prettier": "^3.8.1",
44+
"prettier-plugin-tailwindcss": "^0.7.2",
3545
"typescript": "~5.9.3",
3646
"typescript-eslint": "^8.46.4",
3747
"vite": "^7.2.4"

0 commit comments

Comments
 (0)