Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .eslintrc.cjs

This file was deleted.

7 changes: 7 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": ["react", "import"],
"env": {
"browser": true,
"es2020": true
}
}
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
# React + TypeScript + Vite

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

Comment on lines +3 to +4
Copy link

Copilot AI Sep 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading 'React + TypeScript + Vite' is duplicated on lines 1 and 3. Remove the duplicate heading to avoid confusion.

Suggested change
# React + TypeScript + Vite

Copilot uses AI. Check for mistakes.
This template provides a minimal setup to get React working in Vite with HMR and oxlint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration
## Linting with oxlint

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
This project uses [oxlint](https://oxc-project.github.io/docs/guide/usage/linter.html) for fast and efficient TypeScript/React linting. oxlint provides excellent performance and catches common issues in React applications.

- Configure the top-level `parserOptions` property like this:
The linting configuration is defined in `.oxlintrc.json` and includes:
- React plugin for React-specific rules
- Import plugin for import/export validation
- TypeScript support out of the box

```js
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
To run the linter:
```bash
npm run lint
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
For more advanced configuration options, refer to the [oxlint documentation](https://oxc-project.github.io/docs/guide/usage/linter.html).
Loading