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

feat(eslint-plugin): [explicit-member-accessibility] autofix no-public #1548

Conversation

pablobirukov
Copy link
Contributor

Partially addresses #503.

Autofixes problems reported by "no-public" config option

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @pablobirukov!

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.

@pablobirukov pablobirukov force-pushed the autofix-no-public-in-explicit-member-accessibility branch from e119c20 to 72a33aa Compare January 30, 2020 14:25
@codecov
Copy link

codecov bot commented Jan 30, 2020

Codecov Report

Merging #1548 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1548      +/-   ##
==========================================
+ Coverage   95.42%   95.43%   +<.01%     
==========================================
  Files         140      140              
  Lines        6400     6414      +14     
  Branches     1832     1836       +4     
==========================================
+ Hits         6107     6121      +14     
  Misses        108      108              
  Partials      185      185
Impacted Files Coverage Δ
...-plugin/src/rules/explicit-member-accessibility.ts 97.1% <100%> (+0.73%) ⬆️

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 working on this.
A few comments.

@bradzacher bradzacher added awaiting response Issues waiting for a reply from the OP or another party enhancement: plugin rule option New rule option for an existing eslint-plugin rule labels Jan 30, 2020
@bradzacher bradzacher changed the title fix(eslint-plugin): autofix no-public in explicit-member-accessibility feat(eslint-plugin): [explicit-member-accessibility] autofix no-public Jan 30, 2020
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Jan 31, 2020
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.

almost there. two final comments on the tests.

  • could you please add output tests for all unwantedPublicAccessibility error messages in the tests? Might as well ensure we're covering all the bases (I'm sure it's all working right, but never hurts to over-cover)
  • could you please add a three test cases for the following, just to ensure that if someone changes the rule in the future, we don't lose functionality:
    • public              constructor() {}
      
    • public /* */              constructor() {}
      
    • public              /* */ constructor() {}
      

Thanks for working on this.

@pablobirukov
Copy link
Contributor Author

@bradzacher will you please take a look? I have addressed your comments

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 working on this!
LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: plugin rule option New rule option for an existing eslint-plugin rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants