-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
Prettier not picking up eslintintegration settings working on vue files #608
Comments
PS vuetor is basically working as the vue files have correct colour highlighting |
Basically, eslint-plugin-html has been misused until today. I hope I can direct more people to using eslint-plugin-vue, which is what Vue team is working on and the future. The webpack templates need to be updated though...I'll ping them. |
So can I do anything right now to get standard working in the vue files? The indenting is annoying but not such a problem thanks |
I mean I swapped over to the using |
!!Please Reopen!! The issues is it's not picking up the eslint settings as specified in the workspace settings. This works fine for js files as described above. if I add a .prettierrc with no semis then the vue format changes to match on save. Thus the plugin is working fine, it's just not find the eslint standard settings thanks |
Vetur only picks up setting from eslintrc, not your workspace settings |
It would be great if the existing prettier extension behaviour was preserved in Vetur - prettier.eslintIntegration (default: false) - JavaScript and TypeScript only Use prettier-eslint instead of prettier. Other settings will only be fallbacks in case they could not be inferred from ESLint rules. I think it also looks in editorconfig |
It's impossible to deduce what setup you have without a repro case. So do a fork of https://github.com/octref/veturpack, make modifications, push it and we can take a look.
We won't do that.
We won't do that. |
OK, thanks. If you won't provide those options then I guess I should use .prettierrc and hope it works consistently with prettier, vetur; both VS extensions and commandline. I can live with duoplicating my config as only a few option affect format. thanks |
Thanks for understanding. I hope there can be a single truth of the format (as compared to settings scattered between multiple files like .prettierrc and .editorconfig). |
NP :) It's your project after all :) I just reworked my config based on your example and the prettier docs for eslint integration :) |
I've played around with veturpack by making these modifications (see my fork):
When I tried to format files after these steps, it turns out that the problem described in this issue still exists. ESLint configs are working as expected for |
@Justineo Thanks for providing the fork, I'll take a look tomorrow. |
Oh it's great 👍 |
@octref 所以 vetur 没有在 vue script 中支持 同时维护两份格式化的配置 prettierrc 和 eslintrc 确实是一个不好的实践。 |
@Justineo I took a look at your fork. You cannot remove Specifically,
which is needed for linting and formatting js in vue files. Do not use https://github.com/BenoitZugmeyer/eslint-plugin-html also. Meanwhile I'm working on #523 and it'll be published on the next version. |
Info
Problem
I have a Nuxt project - basically this one without backpack but created with nuxt. Plus my workspace settings are
While
.js
files are correctly formatted on save, without;
. The .vue files are not.;
are added and the indenting of the template section is not adjusted.Reproducible Case
package.json
.eslintrc.js
.editorconfig
I also have the prettier and ES extensions installed and enabled
The text was updated successfully, but these errors were encountered: