-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Pinia Eslint plugin #2612
Comments
Yes, I've been hoping for an eslint expert to show up for the last 3 years 😄. I still haven't lost hope |
I've been looking into what rules would make sense for a pinia eslint plugin. Looking at the docs and came up with some ideas, what do you think @posva and @MickL?
|
Sounds very good! Would it be possible to enforce that ALL variables that are defined in the store also need to be exported by the store? |
Hi @MickL, here is the first version including three rules, I tried it with a vue scaffold already: |
Nice, thanks a lot for the initiative @lisilinhart ! A few notes regarding the rules:
As for other other ideas:
What do you think? |
Hey @posva, thanks for the detailed feedback. Your suggestions make a lot of sense and I'll look into adding those changes into the already existing rules in the next few days. I thought the same thing about only warning around Discussions sounds like a good place to gain insight from actual use cases, should I open one and summarise the points that were mentioned here? |
Feel free to open a discussion if that helps you |
Hey @lisilinhart this sounds amazing! Unfortunately I am currently focusing on backend work but next week I will be back at Nuxt and try it out! |
I opened the discussion here: #2638 |
What problem is this solving
Would be cool to have an Eslint plugin that provides best practices. E.g. With a setup store all variables need to be exported (according to the docs) and a plugin could warn / error if we forgot to export a variable / function.
Maybe there are more best practices or anti patterns that the plugin could warn / error about.
Proposed solution
Describe alternatives you've considered
No response
The text was updated successfully, but these errors were encountered: