-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Unable to disable plugin config loaded from scripts #947
Comments
Thanks for the report, @fbjaras! I think the fix in this prerelease should help you out. Any chance you could try this version to see if it works as expected before I publish a new GA version of Knip? Like so:
If a plugin isn't listed in (an ancestor) There's something funky going on with the |
Wow, thanks for the quick detective work! @webpro Yeah, i got kind of confused by the inconsistency there, but as you say, one step at a time! Looking forward to when the fix is released 🚀 |
🚀 This issue has been resolved in v5.44.2. See Release 5.44.2 for release notes. Using Knip in a commercial project? Please consider becoming a sponsor. |
Thanks again @fbjaras, LFG 🚀 |
Prerequisites
Reproduction url
https://codesandbox.io/p/sandbox/knip-bug-reproduce-yl7hvw
Reproduction access
Description of the issue
Bug description
Providing a config to a script in package.json will make knip evaluate the config for the plugin, even if the plugin is set as
false
Example: (see repro as well)
"playwright-test": "playwright test --config=playwright.config.ts
results in the config to be evaluated, even if plugin is disabled in
knip.json
etc.Ran into this when adding knip to a big monorepo and there were some errors that got thrown in a config file.
Wanted to get knip running by excluding files/etc, before modifying/fixing any issues.
Expected:
Possible to either exclude the config from being evaluated by some config as well as when disabling the plugin.
Note
I am a quite new user of Knip, so i might have missed some option. But i experimented a lot and could not find a solution
The text was updated successfully, but these errors were encountered: