-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: support typescript types in accessor rules #19882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
Hi @DMartens, could you take a look at the CI failure? It’s currently throwing some errors related to Markdown files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! 🙌
I'm not sure what the intent with the typeof context.options[0] === "string"
check was, so just leaving one suggestion there. I'm not confident in it. 🙂
… grouped-accessor-pairs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Would like @JoshuaKGoldberg to review before merging.
@DMartens can you also update the corresponding rule types with the newly added options? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks! 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[x] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What rule do you want to change?
accessor-pairs and grouped-accessor-pairs.
Fixes #19860.
What change do you want to make (place an "X" next to just one item)?
[x] Generate more warnings
[ ] Generate fewer warnings
[ ] Implement autofix
[ ] Implement suggestions
How will the change be implemented (place an "X" next to just one item)?
[x] A new option
[ ] A new default behavior
[ ] Other
Please provide some example code that this change will affect:
What does the rule currently do for this code?
Unchecked
What will the rule do after it's changed?
Also check getters and setters in interfaces and type literals
What changes did you make? (Give an overview)
enforceForTSTypes
for both rulesTSMethodSignature
in the utility functionsgetFunctionNameWithKind
andgetStaticPropertyName
Is there anything you'd like reviewers to focus on?
No