diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9bfb498e3..87e379282 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,7 @@ repos: - eslint-plugin-prettier - eslint-config-prettier - prettier + - eslint-plugin-react@latest - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.4.2 diff --git a/src/frontend/.eslintrc.json b/src/frontend/.eslintrc.json index 50a471e83..1b09f8c18 100644 --- a/src/frontend/.eslintrc.json +++ b/src/frontend/.eslintrc.json @@ -2,15 +2,18 @@ "extends": [ "eslint:recommended", "plugin:react/recommended", - "plugin:prettier/recommended", - "standard" + "plugin:prettier/recommended" ], - "plugins": ["react"], + "plugins": ["react", "import-helpers", "prettier"], + "parser": "@typescript-eslint/parser", "parserOptions": { - "ecmaVersion": 2018 + "project": ["./tsconfig.node.json", "./tsconfig.json"], + "extraFileExtensions:": [".mdx"], + "extensions:": [".mdx"] }, "env": { - "browser": true + "browser": true, + "es2021": true }, "settings": { "react": { diff --git a/src/frontend/src/pages/MainPage/components/components/index.tsx b/src/frontend/src/pages/MainPage/components/components/index.tsx index 4f184377e..566872457 100644 --- a/src/frontend/src/pages/MainPage/components/components/index.tsx +++ b/src/frontend/src/pages/MainPage/components/components/index.tsx @@ -90,7 +90,6 @@ export default function ComponentsComponent({ setPageIndex(1); setPageSize(20); } - return (