Skip to content
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

formatter prettier-eslint not work #2275

Open
3 tasks done
iHearty opened this issue Sep 14, 2020 · 4 comments
Open
3 tasks done

formatter prettier-eslint not work #2275

iHearty opened this issue Sep 14, 2020 · 4 comments

Comments

@iHearty
Copy link

iHearty commented Sep 14, 2020

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: macOS
  • Vetur version: 0.27.3
  • VS Code version: 1.49.0
  • prettier-eslint: ^11.0.0

Problem

use prettier-eslint as default formatter, and eslint --fix not work.

"vetur.format.defaultFormatter.js": "prettier-eslint",

Reproducible Case

image
image

after "Format Document", eslint error not been fixed.

@yoyo930021
Copy link
Member

yoyo930021 commented Sep 14, 2020

Please provide a repro case.
https://github.com/vuejs/vetur/blob/master/.github/NO_REPRO_CASE.md

Also, are you using JS or TS?

@iHearty
Copy link
Author

iHearty commented Sep 21, 2020

please check this repo, focus on Test.vue file, and note that, when i "Format Document", quotes become double, the "Quick Fix" can fix this eslint problem correctly.

@bkarlson
Copy link

bkarlson commented Jan 5, 2021

I confirm this is happening with "vetur.format.defaultFormatter.js": "vscode-typescript" as well (I had to disable Prettier due to Vetur not being able to find it, see #2092 (comment)). Formatting command fixes some indents, but when I save file, VSCode formats it properly... Vetur kinda loses its point w/o proper Prettier support.

@yoyo930021
Copy link
Member

Please provide a repro case.
https://github.com/vuejs/vetur/blob/master/.github/NO_REPRO_CASE.md

PnP part needs more people's help.
Other parts I need more information for debugger.

  1. A repro project.
  2. Output message from VSCode Output panel
  3. Your formatting setting
  4. Steps for repro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants