question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compatibility with Yarn 2 (berry)

See original GitHub issue

I was playing with Yarn 2 and discovered that the linting tools required an additional setup in order to be integrated with VSCode. After running yarn set version berry; yarn install and updating .gitignore, I also had to run this somewhat unusual command:

yarn dlx @yarnpkg/pnpify --sdk vscode   

It created a bunch of files in yarn/sdks and also added .vscode/settings.json with the links to the new entry points for the tools. That affected ESLint, Prettier and TypeScript, but not Markdownlint.

I’m opening this issue to explore what’s needed for a local Makrdownlint to become compatible with VSCode when a project is configured with Yarn 2. The adoption of its new ‘Plug and Play’ architecture is still low, but I guess that the raise is inevitable.

As of now, it seems that VSCode falls back to the global version of Markdownlint, which may be different from the one mentioned in devDependencies. Besides, .markdownlint.json is ignored if the file extends a config in a local npm package. The latter will be fixed for CLI via https://github.com/DavidAnson/markdownlint/pull/342, but we’ll probably need to do something extra to fix the SDK integration as well.

I won’t have time this weekend, but happy to join the investigation and also help with the testing in the upcoming weeks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidAnsoncommented, Feb 11, 2021

I think I have a workaround - though it requires patching markdownlint.

1reaction
DavidAnsoncommented, Feb 10, 2021

Also relevant: https://github.com/webpack/webpack/issues/4175

webpack does not seem to support the scenario where library code needs to dynamically require something.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support Yarn v2 "Berry" · Issue #9527 · storybookjs/storybook
Current situation about the compatibility with Yarn 2 (a.k.a Berry). @crubier created a repo explaining how to make SB works with Yarn Berry: ......
Read more >
Migration | Yarn - Package Manager
A step-by-step and in-depth migration guide from Yarn 1 (Classic) to Yarn 2 (Berry). ... It's compatible with Plug'n'Play, but only starting from...
Read more >
State of Yarn 2 (Berry) in 2021 - Hao's learning log
The fact it breaks compatibility with a lot of projects caused concerns within the community. Well-known names in the JavaScript community ...
Read more >
Yarn 2 (Berry) - Plug'n'play, Constraints and Workspaces
Let's check out Yarn v2 and its amazing new features. There's plug-n-play loading for node modules that gives you much better loading ...
Read more >
Yarn v2 (Berry) - YouTube
I go over what's going on with the release of Yarn v2 and go over whether I'm upgrading to Berry or switching to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found