meteorlxy / eslint-plugin-prettier-vue

:ok_hand: ESLint plugin for Prettier formatting, which is better for Vue SFC
MIT License
115 stars 9 forks source link

Maintenance: merger into the upstream #38

Open JounQin opened 8 months ago

JounQin commented 8 months ago

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.

meteorlxy commented 8 months ago

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:

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.

JounQin commented 8 months ago

It would be nice for eslint-plugin-prettier to support those features natively. But I think this fork might not be an ideal implementation:

  1. 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
  2. I mean mark @vue/compiler-sfc as optional peer dependency, for other frameworks, we use other compiler/parser instead
  3. 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.