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

Appearance settings

Possibility of writing "no-useless-ts-ignore-comments" rule  #236

Copy link
Copy link
Closed
@mohsen1

Description

@mohsen1
Issue body actions

I'm exploring if it's possible to write a rule that warns against // @ts-ignore comments that have become stale as result of changes in other places of even on the line that tsc is being ignored. My approach is to get all diagnostics and cross reference them with // @ts-ignore comments and see which comment does not actually ignoring an error. But if the // @ts-ignore comment is still there TypeScript will not report any diagnostics for the next line.

Is there any way of getting diagnostics if we remove the // @ts-ignore comment?

One solution is to remove all // @ts-ignore comments from source files of existing program, construct a new program with those source files and get diagnostics. This seems very very expensive

Any thoughts on this?

Versions

package version
@typescript-eslint/eslint-plugin 1.3.0
TypeScript 3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    externalThis issue is with another package, not typescript-eslint itselfThis issue is with another package, not typescript-eslint itselfpackage: eslint-pluginIssues related to @typescript-eslint/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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.