8000 [no-obj-calls] Duplicates TypeScript's TS2349 error · Issue #999 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content
[no-obj-calls] Duplicates TypeScript's TS2349 error #999
Closed
@OliverSieweke

Description

@OliverSieweke

Recommended ESLint rules that are already handled by TypeScript are turned off in plugin:@typescript-eslint/recommended.
The recommended no-obj-calls rule should be included in the list as it triggers an ESLint as well as a TypeScript error.

Repro

{
  "extends": [
    "eslint:recommended",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended"
  ]
}
Math();
JSON();
Reflect();
Atomics();

Expected Result

A simple TypeScript error on each line:

  • TS2349: This expression is not callable. Type [...] has no call signatures.

Actual Result

A duplicate error for each line, one coming from TypeScript the other one coming from ESLint:

  • TS2349: This expression is not callable. Type [...] has no call signatures.
  • ESLint: '[...]' is not a function.(no-obj-calls)

Additional Info

Related: #983

Versions

package version
@typescript-eslint/eslint-plugin 2.3.0
@typescript-eslint/parser 2.3.0
TypeScript 3.6.3
ESLint 6.4.0
node 10.16.3
npm 6.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis change will require a new major version to be releasedhas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginrecommended-rulesDiscussion about recommended rule sets

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0