Skip to content

Parse comments  #158

Closed
Closed
@mohsen1

Description

@mohsen1

I want to be able to write a rule that warns against unnecessary @ts-ignore comments

What code were you trying to parse?

// @ts-ignore
var foo: string = 1

What did you expect to happen?
Like Babylon or Flow parsers, emit a list of comments next to list of statements

What actually happened?
No comments list is emitted

Versions
Tried in AST Explorer

package version
@typescript-eslint/parser 1.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions