idahogurl / vs-code-prettier-eslint

A Visual Studio Code Extension to format JavaScript and TypeScript code using the prettier-eslint package.
MIT License
185 stars 46 forks source link

ESLint stage not being applied when `parserOptions.project` is set #160

Closed zikaari closed 1 year ago

zikaari commented 1 year ago

Exact same issue as https://github.com/idahogurl/vs-code-prettier-eslint/issues/38, except in my case I can't use the fix that OP did which is to avoid using parserOptions.project.

Nothing surfaces to the Output panel.

prettier-eslint --write **/*.ts works as expected without any problems.

The updated context information is updated below:

Versions:

System Specifications:

Additional context Add any other context about the problem here.

idahogurl commented 1 year ago

@zikaari The solution is not #38 but to follow the example project instead. https://github.com/idahogurl/vs-code-prettier-eslint/blob/master/examples/typescript/.eslintrc.js

You'll need to name your ESLint config file as .eslintrc.js file. Then set parserOptions with

    project: "./tsconfig.json",
    tsconfigRootDir: __dirname
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

danielwerg commented 1 year ago

@idahogurl For me adding just parserOptions: { tsconfigRootDir: __dirname }, was enough. Would it be possible to skip that part? I would prefer to have more minimalistic config.