Skip to content

Commit

Permalink
fix:解决 vite-plugin-eslint 报错问题 gxmari007/vite-plugin-eslint#74
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnywwy committed Apr 28, 2024
1 parent ff5e322 commit de0c5b6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ module.exports = {
'react/function-component-definition': 0,
'react/react-in-jsx-scope': 0,
'import/prefer-default-export': 0,
'react-hooks/exhaustive-deps': 1
// 'react-hooks/exhaustive-deps': 1,
"react-hooks/exhaustive-deps": "off"
},
ignorePatterns: [".eslintrc.cjs", "vite.config.ts"],
parser: require.resolve('@typescript-eslint/parser'),
parserOptions: {
project: require.resolve('./tsconfig.json'),
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "20.12.7",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.7.1",
Expand All @@ -30,6 +31,7 @@
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.6",
"patch-package": "8.0.0",
"prettier": "3.2.5",
"typescript": "^5.2.2",
"vite": "^5.2.0",
Expand Down
5 changes: 5 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"paths": {
"@/*": [
"./src/*"
]
},

/* Linting */
"strict": true,
Expand Down

0 comments on commit de0c5b6

Please sign in to comment.