Skip to content
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

fix(eslint-plugin): [explicit-member-accessibility] report TSAbstractPropertyDefinition and TSAbstractMethodDefinition properly #3901

Merged
merged 1 commit into from Sep 21, 2021

Conversation

rafaelss95
Copy link
Contributor

Fixes #3835.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @rafaelss95!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@rafaelss95 rafaelss95 changed the title fix(eslint-plugin): [explicit-member-accessibility] code within TSAbstractClassProperty not being reported fix(eslint-plugin): [explicit-member-accessibility] report TSAbstractClassProperty properly Sep 17, 2021
@bradzacher bradzacher added the bug Something isn't working label Sep 20, 2021
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this so fast!
Your change here LGTM.

But there's one thing that's worth mentioning.
Previously the rule completely ignored abstract members. However now it will check them. This will likely cause a lot of new reports on existing codebase.

So I'm going to mark this as a breaking change.
This is perfectly fine as we're already working on the next major - i've update the target branch of your change.
Could you please rebase on the v5 branch?

@@ -274,7 +275,8 @@ export default util.createRule<Options, MessageIds>({

return {
TSParameterProperty: checkParameterPropertyAccessibilityModifier,
ClassProperty: checkPropertyAccessibilityModifier,
'ClassProperty, TSAbstractClassProperty':
checkPropertyAccessibilityModifier,
MethodDefinition: checkMethodAccessibilityModifier,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while we're here we should also handle abstract methods

Suggested change
MethodDefinition: checkMethodAccessibilityModifier,
'MethodDefinition, TSAbstractMethodDefinition': checkMethodAccessibilityModifier,

@bradzacher bradzacher changed the base branch from master to v5 September 20, 2021 21:55
…tPropertyDefinition` and `TSAbstractMethodDefinition` properly
@rafaelss95 rafaelss95 changed the title fix(eslint-plugin): [explicit-member-accessibility] report TSAbstractClassProperty properly fix(eslint-plugin): [explicit-member-accessibility] report TSAbstractPropertyDefinition and TSAbstractMethodDefinition properly Sep 20, 2021
@rafaelss95
Copy link
Contributor Author

I just did the updates. Let me know if I miss something.

@bradzacher bradzacher added this to the 5.0.0 milestone Sep 21, 2021
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for this!

@bradzacher bradzacher added the breaking change This change will require a new major version to be released label Sep 21, 2021
@bradzacher bradzacher merged commit a9af494 into typescript-eslint:v5 Sep 21, 2021
@rafaelss95 rafaelss95 deleted the fix/3835 branch September 21, 2021 00:12
bradzacher pushed a commit that referenced this pull request Sep 21, 2021
…tPropertyDefinition` and `TSAbstractMethodDefinition` properly (#3901)
bradzacher pushed a commit that referenced this pull request Oct 10, 2021
…tPropertyDefinition` and `TSAbstractMethodDefinition` properly (#3901)
bradzacher pushed a commit that referenced this pull request Oct 11, 2021
…tPropertyDefinition` and `TSAbstractMethodDefinition` properly (#3901)
This was referenced Oct 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change This change will require a new major version to be released bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[explicit-member-accessibility] Abstract keyword should not count as accessibility modifier
2 participants