Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New: Support usage alongside eslint-plugin-vue #78

Closed
wants to merge 1 commit into from

Conversation

yyx990803
Copy link
Contributor

@yyx990803 yyx990803 commented Jan 16, 2018

Now that Prettier core 1.10 supports Vue files, we are trying to integrate this plugin to be used alongside eslint-plugin-vue, which uses vue-eslint-parser and allows ESLint to directly lint *.vue files.

To get it working together though, we need to explicitly set prettier's parser to vue when a vue file is encountered in this plugin. Otherwise prettier parses the vue file as JavaScript and throws syntax errors.

/cc @vjeux

yyx990803 added a commit to vuejs/vue-cli that referenced this pull request Jan 16, 2018
@azz
Copy link
Member

azz commented Jan 16, 2018

Please see #76

@not-an-aardvark
Copy link
Member

not-an-aardvark commented Jan 16, 2018

Just merged #76. Does this still need to be merged, or does #76 solve both problems?

@azz
Copy link
Member

azz commented Jan 16, 2018

#76 is a more generic fix, delegating the parser decision to prettier. (solves both problems)

@not-an-aardvark
Copy link
Member

not-an-aardvark commented Jan 16, 2018

Ok, I'll close this and do a release then. Thanks for contributing @yyx990803!

@yyx990803
Copy link
Contributor Author

Ah great, that's indeed even better. Could use the tests from this one though.

@not-an-aardvark
Copy link
Member

Good idea, I fixed the merge conflict and added the test in 1ab43fd.

@azz
Copy link
Member

azz commented Jan 16, 2018

Thanks!

haoqunjiang pushed a commit to vuejs/eslint-config-prettier that referenced this pull request Jul 8, 2019
goldentroll added a commit to goldentroll/eslint-config-prettier that referenced this pull request Mar 14, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants