Skip to content

[explicit-function-return-type] add an exclude list option #4402

Closed
@dangrussell

Description

@dangrussell

Description

Similar advantages to allowedNames on explicit-module-boundary-types and ignoredMethodNames on explicit-member-accessibility

Fail

{
  "@typescript-eslint/explicit-function-return-type": [
    "error",
    {
      "allowedNames": []
    }
  ]
}

ngOnInit() {
    this.initStuff();
}

initStuff(): void {
   this.init = true;
}

Pass

{
  "@typescript-eslint/explicit-function-return-type": [
    "error",
    {
      "allowedNames": ["ngOnInit"]
    }
  ]
}

ngOnInit() {
    this.initStuff();
}

initStuff(): void {
   this.init = true;
}

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