inspector/client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-11-11 12:33:27 +00:00
..
bin Pick non-conflicting default client port 2024-11-11 11:11:27 +00:00
public init client 2024-10-07 16:28:05 -07:00
src Fix bug that roots returned by roots/list are never updated 2024-11-10 23:45:38 +00:00
.gitignore init client 2024-10-07 16:28:05 -07:00
components.json run prettier 2024-11-04 21:29:59 +00:00
eslint.config.js init client 2024-10-07 16:28:05 -07:00
index.html Give page a meaningful title 2024-10-21 14:56:29 +01:00
package.json Remove client prepare script 2024-11-11 12:19:14 +00:00
postcss.config.js run prettier 2024-11-04 21:29:59 +00:00
README.md init client 2024-10-07 16:28:05 -07:00
tailwind.config.js init client 2024-10-07 16:28:05 -07:00
tsconfig.app.json run prettier 2024-11-04 21:29:59 +00:00
tsconfig.json init client 2024-10-07 16:28:05 -07:00
tsconfig.node.json init client 2024-10-07 16:28:05 -07:00
vite.config.ts init client 2024-10-07 16:28:05 -07:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ["./tsconfig.node.json", "./tsconfig.app.json"],
      tsconfigRootDir: import.meta.dirname,
    },
  },
});
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
// eslint.config.js
import react from "eslint-plugin-react";

export default tseslint.config({
  // Set the react version
  settings: { react: { version: "18.3" } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs["jsx-runtime"].rules,
  },
});