eslint-plugin-prettier-vue
eslint-plugin-prettier-vue copied to clipboard
Maintenance: merger into the upstream
Hi @meteorlxy !
I'm the current active maintainer of https://github.com/prettier/eslint-plugin-prettier, and just see this fork accidentally few days ago.
And I think about that is there any chance to merge this fork back into upstream? I believe that the custom blocks support is great for such frameworks commonly like Vue, Svelte, Astro, etc.
If you agree and want to raise a PR for upstream that'll be appreciated. Otherwise I'll think about how to implement such features in eslint-plugin-prettier
.
I want us to collaborate together with @BPScott.
Hi @JounQin . Thanks for your contribution to prettier & eslint ecosystem!
It would be nice for eslint-plugin-prettier to support those features natively. But I think this fork might not be an ideal implementation:
- It still have some unresolved bugs like #13 - simply splitting sfc into separate blocks will lose the file-level context.
- The way it uses to process custom blocks is utilizing vue's sfc compiler. I'm afraid it's not suitable for other frameworks.
- Maybe a prettier plugin could be a better choice?
Based on your knowledgement about prettier, I believe that you can find a better way to support similar features. Let me know if I could help anything.
It would be nice for eslint-plugin-prettier to support those features natively. But I think this fork might not be an ideal implementation:
- Try like this one: https://github.com/un-ts/prettier/blob/80e1909d40d0c2957a40e79f50be13054f27665c/packages/sql/src/index.ts#L106-L110, I can raise a PR for it
- I mean mark
@vue/compiler-sfc
as optional peer dependency, for other frameworks, we use other compiler/parser instead - Yes, I was just talking with the author of https://github.com/Sec-ant/prettier-plugin-embed and custom blocks could be some kind of embed languages
Based on your knowledgement about prettier, I believe that you can find a better way to support similar features. Let me know if I could help anything.
Thanks, I do have some ideas as described above, I'm thinking what's the best choice or we may be able to support all choices.
The benefit of eslint-plugin-prettier
is that it can be reported by tools like VSCode ESLint plugin, while VSCode prettier won't check the file on editing.