mahdisghaier/ThreatHunting-AI-HITL
GitHub: mahdisghaier/ThreatHunting-AI-HITL
一个基于 AI 和人机协同(HITL)理念的威胁狩猎辅助平台,旨在通过 AI 增强安全分析师的威胁检测与分析效率。
Stars: 0 | Forks: 0
# React + TypeScript + Vite
此模板提供了一个最小化的设置,以便在 Vite 中运行带有 HMR 和一些 ESLint 规则的 React。
目前,有两个官方插件可用:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) 使用 [Babel](https://babeljs.io/) 实现 Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) 使用 [SWC](https://swc.rs/) 实现 Fast Refresh
## 扩展 ESLint 配置
如果您正在开发生产应用程序,我们建议更新配置以启用类型感知的 lint 规则:
```
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```
您还可以安装 [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) 和 [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) 以应用 React 专用的 lint 规则:
```
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
```
标签:Babel, CMS安全, DNS解析, ESLint, HMR, JavaScript, JSX, React, SWC, Syscall, Syscalls, TSX, TypeScript, UI开发, Vite, Web开发, 代码规范, 前端工程, 前端构建, 安全插件, 开源项目, 模板, 热更新, 脚手架, 自动化攻击, 错误基检测, 静态代码分析