bding a76140c96d 需求池983 完成 | 3 bulan lalu | |
---|---|---|
config | 10 bulan lalu | |
patches | 10 bulan lalu | |
public | 8 bulan lalu | |
scripts | 7 bulan lalu | |
src | 3 bulan lalu | |
.env.development | 9 bulan lalu | |
.env.production | 9 bulan lalu | |
.env.release | 10 bulan lalu | |
.eslintignore | 10 bulan lalu | |
.eslintrc.js | 10 bulan lalu | |
.gitignore | 6 bulan lalu | |
.prettierrc.js | 10 bulan lalu | |
Dockerfile | 10 bulan lalu | |
README.md | 10 bulan lalu | |
package-lock.json | 4 bulan lalu | |
package.json | 4 bulan lalu | |
tsconfig.json | 4 bulan lalu |
该项目致力于构建一个数据分析、研究输出、逻辑沉淀、知识管理的投研平台。项目前端基于 React17 构建,UI 组件库使用 Antd
参考 .eslintrc.js
及 .prettierrc.js
中的预设
[
'react-app', // default from cra
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
'plugin:react-hooks/recommended', // Uses the recommended rules from react-hooks
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
]
一律使用函数组件,禁止使用类组件
一律使用 hooks
原则上一个文件只写一个组件
组件 props 必须以 Interface 的形式显式声明
两格缩进
不使用分号
一律使用箭头函数而非函数表达式
工作流为
To Do
版相应 issue 手动移至In Process
版中,并 assign 对应成员推进In Process
版中的 issue 将会自动迁移到Review In Process
)Review In Process
版中 issue 将会自动迁移到Done
,并关闭 issue)首先添加 .env.development
文件,并设置API_BASEURL
属性,用于实例化axios instance
,后端地址暂为http://192.168.200.166:2999/api/
In the project directory, you can run:
npm start
Runs the app in the development mode.\ Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.\ You will also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode.\ See the section about running tests for more information.
npm run build
Builds the app for production to the build
folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\ Your app is ready to be deployed!
See the section about deployment for more information.
npm run eject
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.