Skip to content

[@typescript-eslint/explicit-function-return-type] context not recognized #2267

Closed
@NonPolynomial

Description

@NonPolynomial

Repro

rules:
  '@typescript-eslint/explicit-function-return-type': error
const list: readonly {
  readonly foo: (bar: string) => boolean // set return type
}[] = [
  {
    foo: (bar) => true, // <- ESLint complains here
  },
]

Expected Result
ESLint not complaining about missing return type within the array

Actual Result
ESLint complaining about missing return type within the array

Versions

package version
@typescript-eslint/eslint-plugin 2.34.0
@typescript-eslint/parser 2.34.0
TypeScript 3.9.3
ESLint 7.1.0
node 14.2.0
npm 6.14.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: 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