Skip to content

aswils/eslint-plugin-prettier-min-repro

Repository files navigation

Minimal Reproduction

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.

Getting started

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 sdks

Testing diagnostics

There are intentional prettier errors in eslint.config.js. Running eslint should report the errors:

yarn lint

Diagnostics, 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 .

About

A minimal reproduction of an eslint-plugin-prettier regression

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors