Skip to content

Commit 2f4971c

Browse files
committed
feat: update typescript add rsbuild
1 parent eda217c commit 2f4971c

File tree

6 files changed

+20
-9
lines changed

6 files changed

+20
-9
lines changed

.eslintrc.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ module.exports = {
4242
"no-use-before-define": "error",
4343
"@typescript-eslint/no-explicit-any": 0,
4444
"@typescript-eslint/no-non-null-assertion": 0,
45+
"@typescript-eslint/no-unused-expressions": 0,
4546
"@typescript-eslint/no-empty-interface": 0,
4647
},
4748
// 过滤文件
48-
ignorePatterns: ["dist", "node_modules", "pnpm-lock", "env"],
49+
ignorePatterns: ["dist", "node_modules", "pnpm-lock", "env", "prettier.config.cjs"],
4950
};

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ react-typescript 后台管理系统项目模版、内置动态嵌套路由、数
55
![Static Badge](https://img.shields.io/badge/react-black?logo=react&style=for-the-badge)
66
![Static Badge](https://img.shields.io/badge/tailwindcss-black?logo=tailwindcss&style=for-the-badge)
77
![Static Badge](https://img.shields.io/badge/antdesign-black?logo=antdesign&style=for-the-badge)
8+
![Static Badge](https://img.shields.io/badge/swr-black?logo=swr&style=for-the-badge)
89
![Static Badge](https://img.shields.io/badge/mobx-black?logo=mobx&style=for-the-badge)
910
![Static Badge](https://img.shields.io/badge/webpack-black?logo=webpack&style=for-the-badge)
1011
![Static Badge](https://img.shields.io/badge/vite-black?logo=vite&style=for-the-badge)
12+
![Static Badge](https://img.shields.io/badge/rsbuild-black?style=for-the-badge)
1113

1214
<image src='./src/assets/images/admin.png' style='border-radius:10px' height='400px' >
1315

1416
### 🏠 项目概览
1517

16-
#### 构建工具任选 webpack vite
18+
#### 构建工具任选 webpack vite rsbuild
1719

1820
![Static Badge](https://img.shields.io/badge/webpack-black?logo=webpack&style=for-the-badge)
1921
![Static Badge](https://img.shields.io/badge/vite-black?logo=vite&style=for-the-badge)
22+
![Static Badge](https://img.shields.io/badge/rsbuild-black?style=for-the-badge)
2023

2124
> 推荐使用脚手架安装模版 [react-tp-cli](https://github.com/wanpan11/react-template-cli)
2225

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"@types/node": "^18.19.24",
3232
"@types/react": "^18.2.66",
3333
"@types/react-dom": "^18.2.22",
34-
"@typescript-eslint/eslint-plugin": "^5.62.0",
35-
"@typescript-eslint/parser": "^5.62.0",
34+
"@typescript-eslint/eslint-plugin": "^8.28.0",
35+
"@typescript-eslint/parser": "^8.28.0",
3636
"autoprefixer": "^10.4.18",
3737
"babel-loader": "^8.3.0",
3838
"cross-env": "^7.0.3",
@@ -56,7 +56,7 @@
5656
"prettier-plugin-tailwindcss": "^0.3.0",
5757
"style-loader": "^3.3.4",
5858
"tailwindcss": "^3.4.1",
59-
"typescript": "^4.9.5",
59+
"typescript": "^5.8.2",
6060
"webpack": "^5.90.3",
6161
"webpack-bundle-analyzer": "^4.10.1",
6262
"webpack-cli": "^4.10.0",

prettier.config.cjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = {
22
importOrder: ["^(react|react-dom)$", "^([a-z]|@[a-z])", "", "^&src", ".*"],
3-
plugins: [require("prettier-plugin-tailwindcss"), require("@ianvs/prettier-plugin-sort-imports")],
3+
plugins: [
4+
require("prettier-plugin-tailwindcss"),
5+
require("@ianvs/prettier-plugin-sort-imports"),
6+
],
47
};

tailwind.config.cjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ module.exports = {
44
content: ["./src/**/*.{tsx,jsx,ts,js}"],
55
theme: {
66
extend: {
7-
colors: { primary: "#4096ff", dark_bg: "#141414", dark_border: "#303030" },
7+
colors: {
8+
primary: "#4096ff",
9+
dark_bg: "#141414",
10+
dark_border: "#303030",
11+
},
812
boxShadow: {
913
ch: "0px 0px 20px rgba(0, 0, 0, 0.1)",
1014
},

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "ESNext",
3+
"target": "esnext",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,
@@ -16,7 +16,7 @@
1616
"jsx": "react-jsx",
1717
"baseUrl": ".",
1818
"paths": {
19-
"&src/*": ["src/*"]
19+
"&src/*": ["./src/*"]
2020
}
2121
},
2222
"include": ["src"]

0 commit comments

Comments
 (0)