diff --git a/eslint.config.mjs b/eslint.config.mjs index 1c04aad..e2ebe8c 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -9,4 +9,14 @@ const jiti = JITI(import.meta.url); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access const jimmyDotCodes = jiti("./src").default; -export default jimmyDotCodes({ typescript: true, vitest: true }); +export default jimmyDotCodes({ + typescript: true, + vitest: true, + react: true, + testingLibrary: true, + overrides: [ + { + ignores: ["fixtures"], + }, + ], +}); diff --git a/fixtures/tsx.tsx b/fixtures/tsx.tsx new file mode 100644 index 0000000..0fff75d --- /dev/null +++ b/fixtures/tsx.tsx @@ -0,0 +1,3 @@ +export function Component1() { + return
; +} diff --git a/src/configs/react.ts b/src/configs/react.ts index e96dcc9..63621ea 100644 --- a/src/configs/react.ts +++ b/src/configs/react.ts @@ -1,7 +1,7 @@ import jsxA11y from "eslint-plugin-jsx-a11y"; import react from "eslint-plugin-react"; import reactHooks from "eslint-plugin-react-hooks"; -import reactRefresh from "eslint-plugin-react-refresh"; +import * as reactRefresh from "eslint-plugin-react-refresh"; import globals from "globals"; import { GLOB_JSX, GLOB_TSX } from "../constants"; diff --git a/tsconfig.json b/tsconfig.json index f4182c6..f3eaedc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,9 @@ "module": "ESNext", "noEmit": true, + "jsx": "react-jsx", + "types": ["vitest/globals"] - } + }, + "exclude": ["./fixtures/**/*.*"] }