Beginning with v3.4.0 of eslint-plugin-prettier, diagnostics stopped working within code editors when using modern yarn. This repo provides a minimal reproduction for testing and bug reporting.
Clone the repo and ensure all dependencies are installed, such as node and any LSPs. If using nix, a flake has been provided for the dev environment.
Once inside the repo, install the dependencies and the sdks for editor diagnostics.
git clone git@github.com:aswils/eslint-plugin-prettier-min-repro.git
cd eslint-plugin-prettier-min-repro.git
yarn install
yarn sdksThere are intentional prettier errors in eslint.config.js. Running eslint
should report the errors:
yarn lintDiagnostics, however, are not available in the code editor. When opening the eslint config file, no errors are reported.
For comparison, I have created a separate branch called "downgrade" in which we force eslint-plugin-prettier to v3.3.1, the last known working version. Switch to this branch and repeat the above steps. Diagnostics should be reported as expected.
git switch downgrade
yarn install
yarn lint
# Open the code with your preferred editor
nvim eslint.config.js
code .