Skip to content

Commit

Permalink
fix: πŸ› setup react-refresh plugin correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman committed Apr 7, 2024
1 parent 58ec098 commit d51c9f3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
12 changes: 11 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
},
],
});
3 changes: 3 additions & 0 deletions fixtures/tsx.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function Component1() {
return <div />;
}
2 changes: 1 addition & 1 deletion src/configs/react.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"module": "ESNext",
"noEmit": true,

"jsx": "react-jsx",

"types": ["vitest/globals"]
}
},
"exclude": ["./fixtures/**/*.*"]
}

0 comments on commit d51c9f3

Please sign in to comment.