Pradeepv-2006/Homara
GitHub: Pradeepv-2006/Homara
Homara 通过关联网络安全遥测与交易行为数据,实现实时的欺诈检测与网络威胁识别,帮助企业降低误报率并加速事件响应。
Stars: 0 | Forks: 0
# React + TypeScript + Vite
该模板提供了一个最小化的配置,使 React 能在 Vite 中运行,并集成了 HMR 和一些 Oxlint 规则。
目前提供了两个官方插件:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) 使用 [Oxc](https://oxc.rs)
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) 使用 [SWC](https://swc.rs/)
## React Compiler
此模板未启用 React Compiler,因为它会影响开发和构建性能。要添加它,请参阅[此文档](https://react.dev/learn/react-compiler/installation)。
## 扩展 Oxlint 配置
如果您正在开发生产环境的应用程序,我们建议通过安装 `oxlint-tsgolint` 并编辑 `.oxlintrc.json` 来启用具有类型感知的 lint 规则:
```
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"options": {
"typeAware": true
},
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
```
有关规则和类别的完整列表,请参阅 [Oxlint 规则文档](https://oxc.rs/docs/guide/usage/linter/rules)。
标签:后端开发