Compatibility with Yarn 2 (berry)
See original GitHub issueI 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:
- Created 3 years ago
- Comments:22 (22 by maintainers)
Top GitHub Comments
I think I have a workaround - though it requires patching
markdownlint
.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.