Skip to content

Commit c81c89b

Browse files
authored
Apply eslint-plugin-testing-library for test files only (#1581)
1 parent 3c62971 commit c81c89b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

website/docs/GettingStarted.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ Then, add relevant entry to your ESLint config (e.g., `.eslintrc.js`). We recomm
7070

7171
```js
7272
module.exports = {
73-
extends: ['plugin:testing-library/react'],
73+
overrides: [
74+
{
75+
// Test files only
76+
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
77+
extends: ['plugin:testing-library/react']
78+
}
79+
]
7480
};
7581
```
7682

0 commit comments

Comments
 (0)