This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the Oxlint configuration
If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:
snippet.json
1{
2 "$schema": "https://raw.githubusercontent.com/Jon-Becker/hyperliquid-trickshot-proto/main/node_modules/oxlint/configuration_schema.json",
3 "plugins": ["react", "typescript", "oxc"],
4 "options": {
5 "typeAware": true
6 },
7 "rules": {
8 "react/rules-of-hooks": "error",
9 "react/only-export-components": ["warn", { "allowConstantExport": true }]
10 }
11}See the Oxlint rules documentation for the full list of rules and categories.