Navigation Menu

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] private fields cannot have accessibility modifiers #4117

Conversation

danny-may
Copy link
Contributor

@danny-may danny-may commented Nov 10, 2021

PR Checklist

Overview

Private fields, like methods, cannot have accessibility modifiers, and so they shouldnt be required by this rule. To fix this I took the fix that was already done for private methods (#3808) and applied it to private fields too.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @danny-may!

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.

@netlify
Copy link

netlify bot commented Nov 10, 2021

✔️ Deploy Preview for typescript-eslint ready!

🔨 Explore the source changes: ab9a7d8

🔍 Inspect the deploy log: https://app.netlify.com/sites/typescript-eslint/deploys/618bfc35a93c6700086c8c07

😎 Browse the preview: https://deploy-preview-4117--typescript-eslint.netlify.app

@codecov
Copy link

codecov bot commented Nov 10, 2021

Codecov Report

Merging #4117 (ab9a7d8) into master (4875cd6) will increase coverage by 0.60%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4117      +/-   ##
==========================================
+ Coverage   92.73%   93.33%   +0.60%     
==========================================
  Files         334      152     -182     
  Lines       11494     8028    -3466     
  Branches     3270     2576     -694     
==========================================
- Hits        10659     7493    -3166     
+ Misses        362      180     -182     
+ Partials      473      355     -118     
Flag Coverage Δ
unittest 93.33% <100.00%> (+0.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...-plugin/src/rules/explicit-member-accessibility.ts 97.18% <100.00%> (+0.08%) ⬆️
packages/scope-manager/src/lib/es2019.array.ts
packages/scope-manager/src/lib/es2015.promise.ts
packages/scope-manager/src/lib/es2017.intl.ts
...ackages/experimental-utils/src/ts-eslint/ESLint.ts
...perimental-utils/src/ts-eslint-scope/Definition.ts
packages/scope-manager/src/lib/esnext.intl.ts
...ript-estree/src/create-program/createSourceFile.ts
...tal-utils/src/ast-utils/eslint-utils/predicates.ts
packages/scope-manager/src/assert.ts
... and 173 more

@bradzacher bradzacher added the bug Something isn't working label Nov 11, 2021
@bradzacher bradzacher changed the title feat(eslint-plugin): private fields cannot have accessibility modifiers fix(eslint-plugin): [explicit-member-accessibility] private fields cannot have accessibility modifiers Nov 11, 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.

amazing - thanks for jumping in to fix this!

@bradzacher bradzacher merged commit 81b25c1 into typescript-eslint:master Nov 11, 2021
@danny-may danny-may deleted the features/1666-exclude-private-properties branch November 11, 2021 20:02
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[explicit-member-accessibility] False positive when using private fields
2 participants