Chore: Refactor to use messageId in a number of rules #12715
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.
What is the purpose of this pull request? (put an "X" next to item)
[x] Other: Helping to bring the codebase closer to standardisation.
What changes did you make? (Give an overview)
I went through the rules and added
messages
to a number of older rules.I picked non-deprecated rules, and rules that could be simply changed (i.e. essentially just a prop change in
context.report
).I did as many as I could before getting bored 😅 (there's about 71 more rules to go)
There should be no functionality changes at all from this PR.
No new tests have been added, and no tests have been changed (apart from switching from hardcoded
message
tomessageId
+data
).Whilst I was at it, I did a little bit of reformatting to standardise on the format style I saw in other rules.
Let me know if you want me to split this up into separate PRs because of its size.