Skip to content

Commit d633392

Browse files
committed
Merge branch 'vite'
2 parents 7c7850e + 5136751 commit d633392

71 files changed

Lines changed: 4022 additions & 3269 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 依赖目录
2+
node_modules/
3+
dist/
4+
build/
5+
6+
# 构建产物
7+
*.min.js
8+
*.bundle.js
9+
10+
# 配置文件
11+
*.config.js
12+
*.config.ts
13+
vite.config.ts
14+
15+
# 日志文件
16+
*.log
17+
18+
# 临时文件
19+
.tmp/
20+
.cache/
21+
22+
# IDE 文件
23+
.vscode/
24+
.idea/
25+
26+
# 系统文件
27+
.DS_Store
28+
Thumbs.db

.eslintrc.json

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2022": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"@typescript-eslint/recommended",
10+
"plugin:react/recommended",
11+
"plugin:react-hooks/recommended",
12+
"plugin:jsx-a11y/recommended"
13+
],
14+
"parser": "@typescript-eslint/parser",
15+
"parserOptions": {
16+
"ecmaVersion": "latest",
17+
"sourceType": "module",
18+
"ecmaFeatures": {
19+
"jsx": true
20+
}
21+
},
22+
"plugins": [
23+
"react",
24+
"react-hooks",
25+
"@typescript-eslint",
26+
"jsx-a11y"
27+
],
28+
"rules": {
29+
// 代码质量规则
30+
"no-unused-vars": "warn",
31+
"no-unused-imports": "error",
32+
"no-explicit-any": "warn",
33+
"no-array-index-key": "warn",
34+
"no-debugger": "error",
35+
"no-duplicate-case": "error",
36+
"no-duplicate-imports": "error",
37+
"no-empty": "warn",
38+
"no-extra-boolean-cast": "error",
39+
"no-fallthrough": "error",
40+
"no-prototype-builtins": "error",
41+
"no-redeclare": "error",
42+
"no-shadow": "error",
43+
"no-undef": "error",
44+
"no-unreachable": "error",
45+
"no-unsafe-negation": "error",
46+
"use-isnan": "error",
47+
"valid-typeof": "error",
48+
// 代码风格规则
49+
"prefer-const": "error",
50+
"prefer-template": "error",
51+
"no-var": "error",
52+
"prefer-arrow-callback": "error",
53+
"arrow-spacing": "error",
54+
"comma-dangle": [
55+
"error",
56+
"es5"
57+
],
58+
"comma-spacing": "error",
59+
"comma-style": "error",
60+
"computed-property-spacing": "error",
61+
"func-call-spacing": "error",
62+
"key-spacing": "error",
63+
"keyword-spacing": "error",
64+
"object-curly-spacing": [
65+
"error",
66+
"always"
67+
],
68+
"semi": [
69+
"error",
70+
"always"
71+
],
72+
"semi-spacing": "error",
73+
"space-before-blocks": "error",
74+
"space-before-function-paren": [
75+
"error",
76+
"never"
77+
],
78+
"space-in-parens": "error",
79+
"space-infix-ops": "error",
80+
"space-unary-ops": "error",
81+
"spaced-comment": "error",
82+
// TypeScript 特定规则
83+
"@typescript-eslint/no-unused-vars": "warn",
84+
"@typescript-eslint/no-explicit-any": "warn",
85+
"@typescript-eslint/explicit-function-return-type": "off",
86+
"@typescript-eslint/explicit-module-boundary-types": "off",
87+
"@typescript-eslint/no-inferrable-types": "off",
88+
"@typescript-eslint/prefer-optional-chain": "error",
89+
"@typescript-eslint/prefer-nullish-coalescing": "error",
90+
// React 特定规则
91+
"react/react-in-jsx-scope": "off",
92+
"react/prop-types": "off",
93+
"react-hooks/rules-of-hooks": "error",
94+
"react-hooks/exhaustive-deps": "warn",
95+
// 可访问性规则(部分关闭,保持与biome配置一致)
96+
"jsx-a11y/click-events-have-key-events": "off",
97+
"jsx-a11y/no-static-element-interactions": "off",
98+
"jsx-a11y/anchor-is-valid": "warn",
99+
"jsx-a11y/alt-text": "warn",
100+
"jsx-a11y/aria-props": "warn",
101+
"jsx-a11y/aria-proptypes": "warn",
102+
"jsx-a11y/aria-unsupported-elements": "warn",
103+
"jsx-a11y/role-has-required-aria-props": "warn",
104+
"jsx-a11y/role-supports-aria-props": "warn"
105+
},
106+
"settings": {
107+
"react": {
108+
"version": "detect"
109+
}
110+
},
111+
"ignorePatterns": [
112+
"node_modules/",
113+
"dist/",
114+
"build/",
115+
"*.min.js",
116+
"*.bundle.js"
117+
]
118+
}

.prettierignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# 依赖目录
2+
node_modules/
3+
dist/
4+
build/
5+
6+
# 构建产物
7+
*.min.js
8+
*.bundle.js
9+
10+
# 日志文件
11+
*.log
12+
13+
# 临时文件
14+
.tmp/
15+
.cache/
16+
17+
# IDE 文件
18+
.vscode/
19+
.idea/
20+
21+
# 系统文件
22+
.DS_Store
23+
Thumbs.db

.prettierrc

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

.vscode/settings.json

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,42 @@
11
{
2-
"i18n-ally.localesPaths": [
3-
"src/locales"
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.eslint": "explicit",
6+
"source.organizeImports": "explicit"
7+
},
8+
"eslint.validate": [
9+
"javascript",
10+
"javascriptreact",
11+
"typescript",
12+
"typescriptreact"
413
],
5-
"i18n-ally.sourceLanguage": "EN"
14+
"prettier.requireConfig": true,
15+
"[javascript]": {
16+
"editor.defaultFormatter": "esbenp.prettier-vscode"
17+
},
18+
"[javascriptreact]": {
19+
"editor.defaultFormatter": "esbenp.prettier-vscode"
20+
},
21+
"[typescript]": {
22+
"editor.defaultFormatter": "esbenp.prettier-vscode"
23+
},
24+
"[typescriptreact]": {
25+
"editor.defaultFormatter": "esbenp.prettier-vscode"
26+
},
27+
"[json]": {
28+
"editor.defaultFormatter": "esbenp.prettier-vscode"
29+
},
30+
"[css]": {
31+
"editor.defaultFormatter": "esbenp.prettier-vscode"
32+
},
33+
"[scss]": {
34+
"editor.defaultFormatter": "esbenp.prettier-vscode"
35+
},
36+
"[html]": {
37+
"editor.defaultFormatter": "esbenp.prettier-vscode"
38+
},
39+
"[markdown]": {
40+
"editor.defaultFormatter": "esbenp.prettier-vscode"
41+
}
642
}

biome.json

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)