FIB-51490: Scope testing-library plugin to test files only#931
Merged
agierloff88 merged 1 commit intoJun 10, 2026
Merged
Conversation
The flat/react config applied eslint-plugin-testing-library with no files restriction, so it linted all source and produced false positives (e.g. logger.debug() flagged as screen.debug()). Restrict it to test-file globs per the plugin's recommendation. Bump 6.3.6 -> 6.3.7. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lhansford
approved these changes
Jun 10, 2026
lhansford
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for fixing this 🙏
Contributor
Author
|
@lhansford whats the workflow on bumping versions here? I see in other prs the versions have not been bumped. Should we add something to the readme so claude also know the workflow? |
Collaborator
We're just cutting release manually when we want to. There's instructions in the readme |
Contributor
Author
|
got it thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@fishbrain/eslint-config-reactappliedeslint-plugin-testing-library'sflat/reactpreset with nofilesrestriction, so it linted the entire codebase — not just tests. That produces false positives in source, e.g. our ownlogger.debug(...)flagged bytesting-library/no-debugging-utilsas if it werescreen.debug().This scopes the plugin to test files only, following the plugin's official recommendation:
Version bumped 6.3.6 → 6.3.7 (all three package.json files, per the repo's lockstep convention).
Verification
calculateConfigForFileconfirmstesting-library/*rules are now active only on test files:no-debugging-utilssrc/foo.tssrc/foo.test.tsxsrc/__tests__/bar.tsWorkspace tests pass (
yarn workspaces foreach --all run test).Downstream
Once 6.3.7 is published, consumers ("mykiss and friends") can bump and will lose the false positives. In mykiss-web specifically this also unblocks removing the
testing-library/render-result-naming-convention: 'off'workaround (whose comment cites this exact "plugin runs against all files" limitation).Part of FIB-35810 → FIB-51490.
🤖 Generated with Claude Code