Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-obj-calls] Duplicates TypeScript's TS2349 error #999

Closed
OliverSieweke opened this issue Sep 23, 2019 · 1 comment · Fixed by #1000
Closed

[no-obj-calls] Duplicates TypeScript's TS2349 error #999

OliverSieweke opened this issue Sep 23, 2019 · 1 comment · Fixed by #1000
Labels
breaking change This change will require a new major version to be released has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin recommended-rules Discussion about recommended rule sets

Comments

@OliverSieweke
Copy link
Contributor

OliverSieweke commented Sep 23, 2019

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
@OliverSieweke OliverSieweke added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Sep 23, 2019
OliverSieweke added a commit to OliverSieweke/typescript-eslint that referenced this issue Sep 23, 2019
OliverSieweke added a commit to OliverSieweke/typescript-eslint that referenced this issue Sep 23, 2019
@bradzacher bradzacher added breaking change This change will require a new major version to be released has pr there is a PR raised to close this recommended-rules Discussion about recommended rule sets and removed triage Waiting for maintainers to take a look labels Sep 23, 2019
@bradzacher bradzacher added this to the 3.0.0 milestone Sep 23, 2019
@bradzacher
Copy link
Member

consolidated eslint-recommended changes in #1273

@bradzacher bradzacher removed this from the 3.0.0 milestone Dec 3, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change This change will require a new major version to be released has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin recommended-rules Discussion about recommended rule sets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants