-
Notifications
You must be signed in to change notification settings - Fork 38
Ready for review: yarn v2 compat [open discussion] #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This needs typescript-eslint/typescript-eslint#1593 in order to work |
In order to keep the ball moving forward on vuejs/vue-cli#5135 Feel free to provide some feedback and contribute |
At the end of the day, it is more a problem to has to do with how eslint loads plugins and the fact that it has not been designed to fit yarn v2 requirements. According to yarnpkg/berry#8 it seems like eslint has shipped some changes to have better support, but I'm not sure yet how it is affecting this issue. |
edit: it actually works like that without the shimming monkey patch |
@@ -43,5 +43,8 @@ | |||
"@typescript-eslint/parser": "^2.7.0", | |||
"eslint": "^5.0.0 || ^6.0.0", | |||
"eslint-plugin-vue": "^5.2.3 || ^6.0.0" | |||
}, | |||
"dependencies": { | |||
"vue-eslint-parser": "^7.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we add vue-eslint-parser as a dependency rather than a peerDependency, otherwise yarn will throw this kind of error
Error: A package is trying to access a peer dependency that should be provided by its direct ancestor but isn't
Required package: vue-eslint-parser (via "vue-eslint-parser")
Required by: @vue/eslint-config-typescript
And it is arguably right to say it has a direct dependency to it anyways
As demonstrated here: https://github.com/AlexandreBonaventure/workspace-yarn2-example |
Makes sense. |
Actually, for
|
Here, the idea is to have a shim of the
@typescript-eslint/eslint-plugin
so we can keep require statement inside@vue/eslint-config-typescript
while keeping it as a peer dependencies.