Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I haveread the FAQ and my problem is not listed.
Repro
{"rules": {"@typescript-eslint/explicit-member-accessibility":"error" }}
exportclassDog{bark(){console.log('woof!');}}
Expected Result
The methodbark()
is missing the accessibility modified.eslint --fix
should addpublic
.
Actual Result
The methodbark()
is missing the accessibility modified.eslint --fix
cannot automatically fix this.
Additional Info
The docshttps://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
package | version |
---|---|
@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 |