Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enhancement: [naming-convention] Add "override" modifier support #5310

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueenhancement: plugin rule optionNew rule option for an existing eslint-plugin rulepackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@eliasm307

Description

@eliasm307

Before You File a Proposal Please Confirm You Have Done The Following...

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

https://typescript-eslint.io/rules/naming-convention/#how-does-the-rule-automatically-order-selectors

Description

The rule currently supports a few class specific modifiers like'static'|'public'|'protected'|'private'|'abstract' however it does not supportoverride.

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` modifierclassFooextendsBar{protectedoverrideattribute='';protectedoverridemethod(){}}

Pass

// pass depends on what the naming convention is, but the following should NOT trigger a selector with an `override` modifierclassFooextendsBar{protectedattribute='';protectedmethod(){}}

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueenhancement: plugin rule optionNew rule option for an existing eslint-plugin rulepackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp