Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

False positive on no-undef with mixed JS & TS codebase #416

Closed
@tchakabam

Description

@tchakabam

What version of TypeScript are you using?

2.6.1

What version of typescript-eslint-parser are you using?

11.0.0

What code were you trying to parse?

export type SomeThing = {
    id: string;
}

What did you expect to happen?

No lint error

What happened?

False positive on no-undef eslint core rule.

It basically means we can not use type definitions without disabling that rule (globablly or locally)

This has already been discussed in #77

It really becomes tricky when the project mixes JS and TS code.

But we haven't found any viable solution yet, apart applying different configuration to the various file types.

It would be nice if the eslint core rules would be overridable by the Typescript parser usage somehow I guess.

BUT this is really only an issue for mixed JS/TS codebases, because:

let's keep in mind this is easily fixable if your code is Typescript only,
since you can boldly disable this core rule as the TS compiler should complain anyway about a
missing definition of something :)
It really only becomes an issue when you want to take care of JS code using the same lint config.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions