You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This config is subtly bugged because "ignoreFiles" should really be called "ignore". However, instead of sensibly throwing an error with something along the lines of Error: The "ignoreFiles" configuration field is unknown., Knip will instead silently ignore it and then charge ahead as per normal, complaining about "eslint.config.mjs" being unused.
Recommendation
One possible solution here is to show bugged config entries as "hints", and that would have the advantage of not breaking lint runs for users who have existing bugged/invalid configs.
However, I would strongly recommend to throw a hard error instead of a hint, as hints can be hidden from people for a really long time. Related issue: #891
The text was updated successfully, but these errors were encountered:
Suggest an idea for Knip
Introduction
Consider the following config:
This config is subtly bugged because "ignoreFiles" should really be called "ignore". However, instead of sensibly throwing an error with something along the lines of
Error: The "ignoreFiles" configuration field is unknown.
, Knip will instead silently ignore it and then charge ahead as per normal, complaining about "eslint.config.mjs" being unused.Recommendation
One possible solution here is to show bugged config entries as "hints", and that would have the advantage of not breaking lint runs for users who have existing bugged/invalid configs.
However, I would strongly recommend to throw a hard error instead of a hint, as hints can be hidden from people for a really long time. Related issue: #891
The text was updated successfully, but these errors were encountered: