Do we need to support custom messages for patterns in no-restricted-imports and no-restricted-modules? #9846
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
rule
Relates to ESLint's core rules
Follow-up issue to #8400.
Proposal would be to add support for custom error messages when users use patterns in
no-restricted-imports
orno-restricted-modules
. Proposal is basically the same for both rules, so I'm going to save myself some time and only draw it out forno-restricted-modules
.What rule do you want to change?
no-restricted-modules (and no-restricted-imports, analogously)
Does this change cause the rule to produce more or fewer warnings?
Same number of warnings
How will the change be implemented? (New option, new default behavior, etc.)?
New option to create custom messages for pattern-based configurations
Please provide some example code that this change will affect:
Config strawman:
Code:
What does the rule currently do for this code?
Report an error on each line using the generic message for this rule.
What will the rule do after it's changed?
Report an error on each line using the generic message for this rule plus the message supplied in the configuration file.
I'm submitting this as a separate issue to see if this is something we definitely need to support in ESLint (either by strong community voice or by the team coming to consensus independently). I'm not championing this at the moment.
The text was updated successfully, but these errors were encountered: