Skip to content

Commit

Permalink
fix: 🐛 use flat config from eslint-plugin-testing-library
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman committed Nov 23, 2024
1 parent 7980576 commit 054f581
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "0.4.14",
"eslint-plugin-regexp": "^2.7.0",
"eslint-plugin-testing-library": "7.0.0-beta.6",
"eslint-plugin-testing-library": "^7.0.0",
"eslint-plugin-unicorn": "^56.0.1",
"globals": "^15.12.0",
"local-pkg": "0.5.1",
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/rules/testing-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const testingLibraryRules = async () => {
]);

return {
...testingLibrary.configs.react.rules,
...testingLibrary.configs["flat/react"].rules,
...jestDom.configs["flat/recommended"].rules,
} satisfies Rules;
};
10 changes: 0 additions & 10 deletions src/stubs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ declare module "eslint-plugin-jsx-a11y" {
export default plugin;
}

declare module "eslint-plugin-testing-library" {
import type { ESLint, Linter } from "eslint";

const react: Linter.Config;
const plugin: ESLint.Plugin;

export = { configs: { react } };
export default plugin;
}

declare module "eslint-plugin-react-refresh" {
import type { ESLint } from "eslint";

Expand Down

0 comments on commit 054f581

Please sign in to comment.