linter.verify does not validate rule configs #8325
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
core
Relates to ESLint's core APIs and features
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
Tell us about your environment
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
I expected core to throw a config validation error. Note that
["foo"]
is not a valid config for theno-restricted-properties
rule, which accepts a list of objects.What actually happened? Please include the actual, raw output from ESLint.
ESLint returns an empty array (i.e. reports no problems). The
no-restricted-properties
rule gets run with a string option, violating its schema invariant. (no-restricted-properties
happens to handle this gracefully and report no errors, but some other rules crash when this happens.)I'm pretty sure this is a bug -- although
linter
doesn't get configs from the filesystem, it seems like it should still preserve invariants for rules by throwing an error rather than having undefined behavior when a config is invalid.The text was updated successfully, but these errors were encountered: