Skip to content

Commit fd2c28f

Browse files
committed
chore: eslint
1 parent 73444cd commit fd2c28f

File tree

4 files changed

+1809
-92
lines changed

4 files changed

+1809
-92
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# React + TypeScript + Vite
1+
# wildcat-dashboard-ui
2+
3+
## React + TypeScript + Vite
24

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

@@ -7,7 +9,7 @@ Currently, two official plugins are available:
79
- [@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
810
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
911

10-
## Expanding the ESLint configuration
12+
### Expanding the ESLint configuration
1113

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

@@ -49,7 +51,9 @@ export default tseslint.config({
4951
})
5052
```
5153

52-
https://ui.shadcn.com/docs/tailwind-v4
54+
### shadcn
55+
See https://ui.shadcn.com/docs/tailwind-v4
56+
e.g. add a component
5357
```shell
5458
npx shadcn@canary add button
55-
```
59+
```

eslint.config.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,40 @@ import globals from 'globals'
33
import reactHooks from 'eslint-plugin-react-hooks'
44
import reactRefresh from 'eslint-plugin-react-refresh'
55
import tseslint from 'typescript-eslint'
6+
import react from 'eslint-plugin-react'
7+
68

79
export default tseslint.config(
10+
{
11+
languageOptions: {
12+
parserOptions: {
13+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
14+
tsconfigRootDir: import.meta.dirname,
15+
},
16+
},
17+
},
818
{ ignores: ['dist'] },
919
{
10-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
20+
extends: [
21+
js.configs.recommended,
22+
...tseslint.configs.recommendedTypeChecked,
23+
...tseslint.configs.stylisticTypeChecked,
24+
],
25+
ignores: ['src/components/ui/*.tsx'],
1126
files: ['**/*.{ts,tsx}'],
1227
languageOptions: {
1328
ecmaVersion: 2020,
1429
globals: globals.browser,
1530
},
31+
settings: { react: { version: '19.0.0' } },
1632
plugins: {
33+
react,
1734
'react-hooks': reactHooks,
1835
'react-refresh': reactRefresh,
1936
},
2037
rules: {
38+
...react.configs.recommended.rules,
39+
...react.configs['jsx-runtime'].rules,
2140
...reactHooks.configs.recommended.rules,
2241
'react-refresh/only-export-components': [
2342
'warn',

0 commit comments

Comments
 (0)