prettier / prettier/eslint-plugin-prettier
issue with typed configs from typescript-eslint & eslint9 --fix
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.7k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
What version of eslint are you using?
eslint 9.2.0
What version of prettier are you using?
prettier 3.5.2
What version of eslint-plugin-prettier are you using?
5.1.3
Please paste any applicable config files that you're using (e.g. .prettierrc or .eslintrc files)
see flat config setup in https://github.com/aaarichter/eslint-prettier-plugin-issue/blob/main/eslint.config.js
What source code are you linting?
https://github.com/aaarichter/eslint-prettier-plugin-issue/blob/main/src/ts-test/normal-ts.ts
What did you expect to happen?
The plugin should work with the typed configs from typescript-eslint - eg. recommendedTypeChecked. When using the recommended one, the issue does not occur.
What actually happened?
When running eslint . --fix initially, there seems to be some issue with the eslint typescript parser, which produces the output shown in the screenshot below. Eslint & prettier fixing still applies, but the output by eslint is very confusing.
The issue does not occur when either switch to the typescript-eslint recommended config, or remove the eslint-plugin-prettier, or use only the eslint . command
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked eslint.config.js and src/ts-test/normal-ts.ts reproduction, then run eslint . --fix using the reported ESLint, Prettier, and eslint-plugin-prettier versions. Compare the output with and without the typescript-eslint recommendedTypeChecked configuration; done means the typed config no longer produces confusing output while fixes still apply.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100