Maiquu / nuxt-quasar

Quasar Module for Nuxt (Unofficial)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

💡 [REQUEST] - Prettier/Eslint support to automatically maintain the same code-style

JasonLandbridge opened this issue · comments

Describe the feature

Hi there,

Could we setup Prettier and Eslint for this project? This would make contributions easier as the formatting and maintaining of code style is done automatically.

Would be happy to set it up myself but this is one of those things the owner should decide on which rules they would like.

Cheers!

Additional information

  • Would you be willing to help implement this feature?
  • Does this feature have a potential to break existing features?

I assumed configuration provided by nuxt would cover most necessary settings but that doesn't seem to be the case.

I will be looking into eslint settings. Not sure about prettier since its very opinionated. If it doesn't mess with the current code a lot, I will consider it.

Sure sounds good!

Would like to express my opinion about the matter if i may:
I think this module is perfect as is, a simple nuxt module that adds quasar UI and plugins and doesn't do anything else.

I think in the case of a "Starter Project" eslint/prettier would fit perfectly - so i believe the best solution would be to link from this module to an optional(and maybe suggested) starter template for Nuxt 3 + Quasar + Eslint/Prettier + Etc...
But ofcourse, it will still be opinionated

Another option - to add a section of project starter templates the community maintains - and then @JasonLandbridge can share his opinionated template.

Would like to express my opinion about the matter if i may: I think this module is perfect as is, a simple nuxt module that adds quasar UI and plugins and doesn't do anything else.

Yeah agreed!

I think in the case of a "Starter Project" eslint/prettier would fit perfectly - so i believe the best solution would be to link from this module to an optional(and maybe suggested) starter template for Nuxt 3 + Quasar + Eslint/Prettier + Etc... But ofcourse, it will still be opinionated

My understanding is that the Prettier/Eslint would only apply to the code of this plugin and would help maintain some style consistency and ease of formatting. It should not cause any effect in any project that uses Nuxt-Quasar.

Another option - to add a section of project starter templates the community maintains - and then @JasonLandbridge can share his opinionated template.

Fair idea, I simply have no opinion on what the code style should be. I just noticed my IDE settings would format my contributions a certain way and then I would have to go back and manually format my changes to be in line with what the rest is. I figured some Prettier/Eslint configs would keep everything automatically the same.

Just wanted to throw my two cents in, a blog post by antfu on Why I don't use Prettier.
I'm with @Maiquu on not using Prettier, eslint should cover almost all use cases.

Good article, I agree with just using Eslint as well!

My understanding is that the Prettier/Eslint would only apply to the code of this plugin and would help maintain some style consistency and ease of formatting. It should not cause any effect in any project that uses Nuxt-Quasar.

Oh you meant add it to this project lol, my bad!
With that i definitely agree 😄

And i also think Eslint would be a better choice

Used antfu's eslint config with minor modifications. Used this config for most of my projects.