bding 813584dd21 修改已取消的时间 | 6 months ago | |
---|---|---|
config | 8 months ago | |
patches | 8 months ago | |
public | 7 months ago | |
scripts | 8 months ago | |
src | 6 months ago | |
.env.development | 7 months ago | |
.env.production | 7 months ago | |
.env.release | 8 months ago | |
.eslintignore | 8 months ago | |
.eslintrc.js | 8 months ago | |
.gitignore | 8 months ago | |
.prettierrc.js | 8 months ago | |
Dockerfile | 8 months ago | |
README.md | 8 months ago | |
package-lock.json | 7 months ago | |
package.json | 7 months ago | |
tsconfig.json | 8 months ago |
该项目致力于构建一个数据分析、研究输出、逻辑沉淀、知识管理的投研平台。项目前端基于 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.