using tsParser in eslint config

This commit is contained in:
Mose Müller 2024-07-08 08:51:01 +02:00
parent b83e241b32
commit b856ed3a12
3 changed files with 8 additions and 4 deletions

View File

@ -2,6 +2,7 @@ import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import reactRecommended from "eslint-plugin-react/configs/recommended.js";
import tsParser from "@typescript-eslint/parser";
export default [
eslint.configs.recommended,
@ -10,6 +11,9 @@ export default [
{
files: ["**/*.{js,jsx,ts,tsx}"],
...reactRecommended,
languageOptions: {
parser: tsParser,
},
rules: {
"prettier/prettier": "error",
"react/react-in-jsx-scope": "off",

View File

@ -22,8 +22,8 @@
"@types/node": "^20.14.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",

View File

@ -24,8 +24,8 @@
"@types/node": "^20.14.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",