We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://codesandbox.io/p/sandbox/zealous-northcutt-g94nf7
Including "customSyntax": "postcss-less" in the stylelint config does not mark postcss-less as a used dependency. knip definitely detects the config file correctly, but there is nothing in the plugin code that checks this field. https://github.com/webpro-nl/knip/blob/main/packages/knip/src/plugins/stylelint/index.ts
"customSyntax": "postcss-less"
postcss-less
Knip produces the following report:
Unused devDependencies (1) postcss-less package.json
By switching to a JS config, you can do
"customSyntax": require.resolve("postcss-less")
which causes the dependency to be correctly marked as used.
The text was updated successfully, but these errors were encountered:
I'll try to raise a PR for this at some point, for now it's just a nice-to-have so that knip works better out-of-the-box.
Sorry, something went wrong.
Sounds great, thanks in advance! Let me know if you need anything.
webpro-nl#799 stylelint customSyntax config field indicates dependenc…
e395500
…y usage
webpro-nl#799 add test case for customSyntax field
6478883
webpro-nl#799 fix incorrect test fixture
5031192
Successfully merging a pull request may close this issue.
Prerequisites
Reproduction url
https://codesandbox.io/p/sandbox/zealous-northcutt-g94nf7
Reproduction access
Description of the issue
Including
"customSyntax": "postcss-less"
in the stylelint config does not markpostcss-less
as a used dependency. knip definitely detects the config file correctly, but there is nothing in the plugin code that checks this field. https://github.com/webpro-nl/knip/blob/main/packages/knip/src/plugins/stylelint/index.tsKnip produces the following report:
Workaround
By switching to a JS config, you can do
which causes the dependency to be correctly marked as used.
The text was updated successfully, but these errors were encountered: