React开发通用管理后台

技术选型

react18

typescript

antd

router6.0

vite5.0

  1. 安装yarn
npm install -g yarn
  1. 使用vite创建react项目
npm init vite
yarn create vite
  1. 运行项目
cd react-manager //项目目录
npm install
npm run dev
-----------
yarn install
yarn dev

项目配置

editorconfig配置

项目根目录创建 .editorconfig 文件

# https://editorconfig.org
root = tue

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

配置解读

root=true 对所有文件生效

end_of_line= lf 不同操作系统换行符不同

end_of_line
lf | cr | crlf (大小写不限
复制代码
end_of_line设置的换行符的表示方式先看一下这几个值是什么意思

lf全拼Line Feed意思是换行用符号 \n 表示
cr: 全拼Carriage Return 意思是回车 用符号 \r 表示
crlfcr  lf的结合回车换行用符号 \r\n

insert_final_newline = true 代码最后新增一行

trim_trailing_whitespace = true 修剪尾随空格

0%