Skip to content

Feature Request: fix based on tsconfig aliases #22

Open
@Flyrell

Description

@Flyrell

Hi @MelvinVermeer and thanks for the useful plugin!

The problem: We use ESLint's auto-fixing in IDEs to run after each save. Unfortunately, we've got multiple aliases setup in tsconfig.json and realised that the plugin doesn't work with them, so it's quite difficult to set up a single rootDir for the whole project and/or other monorepos.

Possible solutions:

  1. We could add a config property which would specify the path to tsconfig file from where we can get the aliases which will be used as the rootDir for the auto-fix.
  2. We could maybe check the eslint parser used for the file, if the parser is set to @eslint-typescript/parser, we can probably extract the tsconfig from there somehow and use aliases from there to set rootDir for the auto-fix.

Not sure if any of these solutions are possible. My question is: have you tried doing something similar? Would you be ok if we were to create a pull request for the feature like that? Thanks for the response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions