Skip to content

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

Merged
merged 2 commits into from
Feb 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ module.exports = {
// in turn delegates to the parser, specified in `parserOptions.parser`:
// https://github.com/vuejs/eslint-plugin-vue#what-is-the-use-the-latest-vue-eslint-parser-error
parserOptions: {
parser: '@typescript-eslint/parser',
parser: require.resolve('@typescript-eslint/parser'),
extraFileExtensions: ['.vue'],
ecmaFeatures: {
jsx: true
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Copy link
Contributor Author

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

}
}
}
2 changes: 1 addition & 1 deletion recommended.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ module.exports = {
],

// the ts-eslint recommended ruleset sets the parser so we need to set it back
parser: 'vue-eslint-parser',
parser: require.resolve('vue-eslint-parser'),

rules: {
// this rule, if on, would require explicit return type on the `render` function
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -3981,6 +3981,18 @@ vue-eslint-parser@^6.0.5:
esquery "^1.0.1"
lodash "^4.17.11"

vue-eslint-parser@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.0.0.tgz#a4ed2669f87179dedd06afdd8736acbb3a3864d6"
integrity sha512-yR0dLxsTT7JfD2YQo9BhnQ6bUTLsZouuzt9SKRP7XNaZJV459gvlsJo4vT2nhZ/2dH9j3c53bIx9dnqU2prM9g==
dependencies:
debug "^4.1.1"
eslint-scope "^5.0.0"
eslint-visitor-keys "^1.1.0"
espree "^6.1.2"
esquery "^1.0.1"
lodash "^4.17.15"

vue-property-decorator@^8.3.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/vue-property-decorator/-/vue-property-decorator-8.3.0.tgz#536f027dc7d626f37c8d85a2dc02f0a6cb979440"