Skip to content

Support .eslintrc.ts #12078

@G-Rath

Description

@G-Rath

The version of ESLint you are using.
6

The problem you want to solve.
Allowing typescript users to write strongly typed .eslintrc configuration files that "just work" in the same manner as .eslintrc.js.

Your take on the correct solution to problem.
use ts-node to bootstrap .ts files if it's available.

This would be following in the footsteps of other libraries, including:

While I've used ts-node, I've never implemented this sort of feature before.
I know that webpack-nano uses rechior to achieve this feature.
That in turn uses interpret, which is also what webpack uses.

I would additionally propose this happens by default, w/o requiring a config value - eslint would search for a .js file first, followed by a .ts file, since in TS land this usually represents a compiled TS file.

Are you willing to submit a pull request to implement this change?

Gladly, but would most likely require some guidance from others having never worked w/ eslint core directly (including general github & ci processes).


Overall, I think that this feature makes sense to support given the work being done to merge tslint into eslint via @typescript-eslint.

Ultimately, I'd love to see a day where I can write a .eslintrc.ts and have everything work as they would if I'd had a .js as the extension.

I think it's reasonable to require the installation of additional dependencies in the application being linted for this feature; as such if there's a way to implement this feature as a separate package over at @typescript-eslint then I'm game for that 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    archived due to ageThis issue has been archived; please open a new issue for any further discussionauto closedThe bot closed this issuecoreRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLintevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions