From 8f72e222107f1786aa49b31fe1da5fa16972d4de Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 10 Mar 2025 22:11:33 +0900 Subject: feat(frontend): migrate from .eslintrc.cjs to eslint.config.js (flat config) --- frontend/eslint.config.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 frontend/eslint.config.js (limited to 'frontend/eslint.config.js') diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js new file mode 100644 index 0000000..538fb12 --- /dev/null +++ b/frontend/eslint.config.js @@ -0,0 +1,37 @@ +import js from "@eslint/js"; +import jsxA11y from "eslint-plugin-jsx-a11y"; +import react from "eslint-plugin-react"; +import reactHooks from "eslint-plugin-react-hooks"; +import { defineConfig, globalIgnores } from "eslint/config"; +import globals from "globals"; +import ts from "typescript-eslint"; + +export default defineConfig( + globalIgnores(["node_modules/", ".react-router/", "build/"]), + js.configs.recommended, + ts.configs.recommended, + react.configs.flat.recommended, + react.configs.flat["jsx-runtime"], + reactHooks.configs["recommended-latest"], + jsxA11y.flatConfigs.recommended, + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + }, + }, + }, + { + settings: { + react: { + version: "detect", + }, + formComponents: ["Form"], + linkComponents: [ + { name: "Link", linkAttribute: "to" }, + { name: "NavLink", linkAttribute: "to" }, + ], + }, + }, +); -- cgit v1.2.3-70-g09d2