Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add eslint compat layer
  • Loading branch information
shaoyu committed Jun 18, 2024
commit 297690f3a76e97cca219051d72f5e0492165ae1f
3 changes: 2 additions & 1 deletion packages/create-vite/template-react-ts/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { fixupPluginRules } from "@eslint/compat";
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
Expand All @@ -15,7 +16,7 @@ export default [
parser: tsParser,
},
plugins: {
'react-hooks': reactHooks,
'react-hooks': fixupPluginRules(reactHooks),
'react-refresh': reactRefresh,
'@typescript-eslint': tsPlugin,
},
Expand Down
7 changes: 4 additions & 3 deletions packages/create-vite/template-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@eslint/js": "^9.0.0",
"@eslint/compat": "^1.1.0",
"@eslint/js": "^9.5.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^9.0.0",
"eslint": "^9.5.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"globals": "^15.6.0",
"typescript": "^5.2.2",
"typescript": "^5.4.5",
"vite": "^5.3.1"
}
}
5 changes: 3 additions & 2 deletions packages/create-vite/template-react/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { fixupPluginRules } from "@eslint/compat";
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
Expand All @@ -20,8 +21,8 @@ export default [
},
},
plugins: {
react,
'react-hooks': reactHooks,
react: fixupPluginRules(react),
'react-hooks': fixupPluginRules(reactHooks),
'react-refresh': reactRefresh,
},
rules: {
Expand Down
13 changes: 7 additions & 6 deletions packages/create-vite/template-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@eslint/js": "^9.0.0",
"@eslint/compat": "^1.1.0",
"@eslint/js": "^9.5.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^9.0.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"globals": "^15.0.0",
"eslint": "^9.5.0",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"globals": "^15.6.0",
"vite": "^5.3.1"
}
}