Skip to content

Commit 64f475d

Browse files
committed
initialize the app
1 parent 43cf733 commit 64f475d

33 files changed

+7973
-8322
lines changed

.eslintrc.cjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ module.exports = {
33
env: { browser: true, es2020: true },
44
extends: [
55
'eslint:recommended',
6-
'plugin:@typescript-eslint/recommended',
6+
'plugin:react/recommended',
7+
'plugin:react/jsx-runtime',
78
'plugin:react-hooks/recommended',
89
],
910
ignorePatterns: ['dist', '.eslintrc.cjs'],
10-
parser: '@typescript-eslint/parser',
11+
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
12+
settings: { react: { version: '18.2' } },
1113
plugins: ['react-refresh'],
1214
rules: {
15+
'react/jsx-no-target-blank': 'off',
1316
'react-refresh/only-export-components': [
1417
'warn',
1518
{ allowConstantExport: true },

README.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,8 @@
1-
# React + TypeScript + Vite
1+
# React + Vite
22

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

55
Currently, two official plugins are available:
66

77
- [@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
88
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9-
10-
## Expanding the ESLint configuration
11-
12-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13-
14-
- Configure the top-level `parserOptions` property like this:
15-
16-
```js
17-
export default {
18-
// other rules...
19-
parserOptions: {
20-
ecmaVersion: 'latest',
21-
sourceType: 'module',
22-
project: ['./tsconfig.json', './tsconfig.node.json'],
23-
tsconfigRootDir: __dirname,
24-
},
25-
}
26-
```
27-
28-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29-
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30-
- 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

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + React + TS</title>
7+
<title>Vite + React</title>
88
</head>
99
<body>
1010
<div id="root"></div>
11-
<script type="module" src="/src/main.tsx"></script>
11+
<script type="module" src="/src/main.jsx"></script>
1212
</body>
1313
</html>

jest.config.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)