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

[no-func-assign] Duplicates TypeScript's TS2539 error #983

Closed
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
@OliverSieweke

Description

@OliverSieweke

Recommended ESLint rules that are already handled by TypeScript are turned off inplugin:@typescript-eslint/recommended.
The recommendedno-func-assign 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"  ]}
functionfoo(){}foo=bar;

Expected Result

A simple TypeScript error for line 2:

  • TS2539: Cannot assign to 'foo' because it is not a variable.

Actual Result

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

  • TS2539: Cannot assign to 'foo' because it is not a variable.
  • ESLint: 'foo' is a function.(no-func-assign)

Additional Info

Versions

packageversion
@typescript-eslint/eslint-plugin2.3.0
@typescript-eslint/parser2.3.0
TypeScript3.6.3
ESLint6.4.0
node10.16.3
npm6.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


      [8]ページ先頭

      ©2009-2025 Movatter.jp