Repository navigation
fix(playwright): resolve globalSetup/globalTeardown from config dir - #2076
Merged
webpro merged 1 commit intoSep 30, 2026
Merged
Conversation
Playwright resolves relative globalSetup and globalTeardown paths against the config file's directory. Knip resolved them from the workspace root, so with a config in a subdirectory the files were reported as unused. Closes webpro-nl#2072 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit: |
Member
|
Thank you 🧡 |
Member
|
🚀 This pull request is included in v6.39.0. See Release 6.39.0 for release notes. Using Knip in a commercial project? Please consider becoming a sponsor. |
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.
Fixes #2072.
Playwright resolves relative
globalSetup/globalTeardownpaths against the config file's directory. The plugin passed them totoEntrywithout changing them, so they were resolved from the workspace root. With a config in a subdirectory (e2e/playwright.config.ts+globalSetup: './support/setup.ts'), the setup file was reported as unused.The fix resolves these paths with
toAbsolute(id, configFileDir), which is what the oxlint plugin already does. Absolute paths are still passed through unchanged.The new fixture
plugins/playwright3reproduces the bug: before the fix,e2e/support/global-setup.tsandglobal-teardown.tsare reported as unused files.🤖 Generated with Claude Code