no-restricted-imports does not show which member is deprecated or allow for message customization per member #14342
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
rule
Relates to ESLint's core rules
triage
An ESLint team member will look at this issue soon
Projects
What rule do you want to change?
no-restricted-imports
The DX of this rule does not indicate which member is deprecated when using importNames, nor does it allow message customization per member in the importNames list. I would like the rule to handle this to improve the developer experience and make it useful for deprecations across a distributed organization.
Does this change cause the rule to produce more or fewer warnings?
More potentially
How will the change be implemented? (New option, new default behavior, etc.)?
There are a few options:
Please provide some example code that this change will affect:
For #1 above:
For #2 above:
What does the rule currently do for this code?
For #1, only the last path in the list works, the others are ignored.
For #2, it breaks because messages is not recognized.
What will the rule do after it's changed?
It will allow for specific messages per member so that the warning is specific to the member, providing better user/developer experience.
Are you willing to submit a pull request to implement this change?
I wish I was able to, but unfortunately don't have the bandwidth at the moment. We rely on this tool for work and would really appreciate this change being implemented. I will attempt it in a few months if not.
The text was updated successfully, but these errors were encountered: