Prettier-vscode: Prettier ESLint should be invoked for TypeScript files

Created on 3 Aug 2017  路  8Comments  路  Source: prettier/prettier-vscode

ESLint supports TypeScript files through typescript-eslint-parser.

However, when eslintIntegration is enabled, this extension will silently skip prettier-eslint for TypeScript files: https://github.com/prettier/prettier-vscode/blob/7431dd3dc8c0e324be98378efcd1a90ce4f547fa/src/PrettierEditProvider.ts#L118

Are you happy for me to raise a PR that changes this, so TypeScript files do run through prettier-eslint?

enhancement locked

Most helpful comment

Any updates on this? My team is having to manually apply this patch on every update.

All 8 comments

I'm somewhat embarrassed with that. I would highly prefer to use tslint with TS files.
What happens if you have a project with eslint for your JS and tslint for your TS ?

Relevant #188

As far as I'm aware this project doesn't support tslint.

To give you some context, we are incrementally migrating a JS codebase to TS. We don't want to complicate the migration by also switching linter. ESLint works fine for TS files.

As far as I'm aware this project doesn't support tslint.

You are right, but it could: prettier/prettier-eslint#92

I can give you another context.
We are migrating a flow codebase to typescript. We have flow parser for eslint.

So, i'm a little confused. Can we add tslint integration?

Or have it run tslint --fix after?

I think we need to support users who use both ESLint and tslint with their .ts files. How exactly tslint integration should work is probably best discussed in the separate issue #92.

Any updates on this? My team is having to manually apply this patch on every update.

prettier-eslint supports ts files with typescript-eslint-parser since v7.1.0.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

screendriver picture screendriver  路  4Comments

finalclass picture finalclass  路  4Comments

SkeLLLa picture SkeLLLa  路  4Comments

PetrykowskiM picture PetrykowskiM  路  3Comments

GantMan picture GantMan  路  3Comments