Skip to content

Commit a4e1dd7

Browse files
authored
feat!(test): Add linting for react-testing-library (#82)
## Problem There was no linting for [`@testing-library/react`](https://testing-library.com/docs/react-testing-library/intro) yet the `package.json` was already installing [`eslint-plugin-testing-library`](https://github.com/Belco90/eslint-plugin-testing-library). ## Solution Added `'plugin:testing-library/react'` as one of the plugins the `eslint.config.js` extends from to receive the recommended react ESLint rules. Fixes #81 BREAKING CHANGE: This is now failing for new lint errors so it's technically a breaking change, although it should be super-duper minor.
1 parent d2ab218 commit a4e1dd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/test/eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = {
77
'plugin:@typescript-eslint/recommended',
88
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
99
'plugin:jest/recommended',
10+
'plugin:testing-library/react',
1011
'plugin:prettier/recommended',
1112
'prettier/@typescript-eslint',
1213
'prettier/react',
@@ -72,7 +73,6 @@ module.exports = {
7273
'react/jsx-filename-extension': ['error', { extensions: ['.tsx', '.jsx'] }],
7374
'react/jsx-one-expression-per-line': 'off',
7475
'react/prop-types': 'off',
75-
// semi: ['error', 'never'],
7676

7777
// need to be turned off for rules in plugin:@typescript-eslint/recommended
7878
'no-undef': 'off',

0 commit comments

Comments
 (0)