Closed
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I have searched for related issues and found none that match my proposal.
- I have searched the current rule list and found no rules that match my proposal.
- I have read the FAQ and my problem is not listed.
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Link to the rule's documentation
Description
The rule currently supports a few class specific modifiers like 'static'|'public'|'protected'|'private'|'abstract'
however it does not support override
.
This would be useful in some cases, for example if you dont want private/protected class members to have a leading or trailing underscore in your code base but would like to allow them if you are extending third-party or legacy code class members with leading or trailing underscores where you cannot change them to suite the rule.
Currently, the above requires a lot of eslint ignore comments if the naming convention rule is to be strict (ie "error" level) or softening the rule to warnings.
Fail
// fail depends on what the naming convention is, but the following should trigger a selector with an `override` modifier
class Foo extends Bar {
protected override attribute = '';
protected override method() {}
}
Pass
// pass depends on what the naming convention is, but the following should NOT trigger a selector with an `override` modifier
class Foo extends Bar {
protected attribute = '';
protected method() {}
}
Additional Info
No response
Metadata
Metadata
Assignees
Labels
Go ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issueNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin ruleIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin