Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
burtek committed Jan 8, 2024
1 parent 54da565 commit cf5df1f
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions configs/testing-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ const files = ['**/*.test.{js,cjs,mjs,jsx,ts,cts,mts,tsx}'];
// eslint-disable-next-line no-warning-comments
// TODO: move to FlatConfig once testing-library and jest-dom are upgraded
export function prepareConfig() {
return defineFlatConfig([{
files,
plugins: {
'jest-dom': { rules: jestDom.rules },
'testing-library': { rules: testingLibrary.rules }
},
rules: {
...jestDom.configs.all.rules,
...testingLibrary.configs.react.rules,
'testing-library/prefer-explicit-assert': 'error',
'testing-library/prefer-user-event': 'warn'
return defineFlatConfig([
{
files,
plugins: {
'jest-dom': { rules: jestDom.rules },
'testing-library': { rules: testingLibrary.rules }
},
rules: {
...jestDom.configs.all.rules,
...testingLibrary.configs.react.rules,
'testing-library/prefer-explicit-assert': 'error',
'testing-library/prefer-user-event': 'warn'
}
}
}]);
]);
}

0 comments on commit cf5df1f

Please sign in to comment.