-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
{
"rules": {
"@typescript-eslint/explicit-member-accessibility": "error"
}
}export class Dog {
bark() {
console.log('woof!');
}
}Expected Result
The method bark() is missing the accessibility modified. eslint --fix should add public.
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
| 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 |
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin