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

False positives forno-unnecessary-type-assertion #187

Closed
Labels
bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@armano2

Description

@armano2

Repro

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/src/convert.ts#L450

{  ..."rules":{"@typescript-eslint/no-unnecessary-type-assertion":"error",    ...},"parserOptions":{"sourceType":"module","project":["./packages/typescript-estree/tsconfig.json","./packages/parser/tsconfig.json","./packages/eslint-plugin-tslint/tsconfig.json"],"ecmaFeatures":{"jsx":false}},  ...}

Expected Result
there should not be error on(node as any).externalModuleIndicator

Actual Result

506:24  error  This assertion is unnecessary since it does not change the type of the expression  @typescript-eslint/no-unnecessary-type-assertion

Additional Info
i'm getting a lot of false positives in convert.ts

Versions

packageversion
@typescript-eslint/eslint-pluginmaster
@typescript-eslint/parsermaster
TypeScript~3.2.1
ESLint^5.12.1
nodeX.Y.Z
npmX.Y.Z

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp