custom-error-definition: Cover exports name #313
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #190.
I cheated a bit for this one. If the rule is turned on it will force the error name to be correct so the rule only has to check for a mismatch on the
exports
identifier in the case where the right hand side is an error class.There was another interesting case that I did NOT cover:
It would theoretically be possible to find an error definition from earlier in the same file. If we want this scenario covered, then I can add it in.