-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[explicit-member-accessibility] "explicit" option suggestions #4647
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
Comments
This is by design. Is public really the right accessibility to use for the member you just wrote? If we simply autofixed every case to public then it would defeat the purpose of the rule. |
Reopening per #5492 to track that we'd accept a suggestion fixer. |
Closed in #5492 |
Uh oh!
There was an error while loading. Please reload this page.
Repro
Expected Result
The method
bark()
is missing the accessibility modified.eslint --fix
should addpublic
.Actual Result
The method
bark()
is missing the accessibility modified.eslint --fix
cannot automatically fix this.Additional Info
The docs https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md#attributes mention this rule is fixable. This only works for
{ accessibility: 'no-public' }
but not for{ accessibility: 'explicit' }
(which is the default).Versions
@typescript-eslint/eslint-plugin
5.14.0
@typescript-eslint/parser
5.14.0
TypeScript
4.6.2
ESLint
8.10.0
node
16.14.0
The text was updated successfully, but these errors were encountered: