vuestorefront / vue-storefront

Alokai is a Frontend as a Service solution that simplifies composable commerce. It connects all the technologies needed to build and deploy fast & scalable ecommerce frontends. It guides merchants to deliver exceptional customer experiences quickly and easily.
https://www.alokai.com
MIT License
10.64k stars 2.08k forks source link

Enable eslint order-in-components for vue components and fix current state #1951

Closed szafran89 closed 4 years ago

szafran89 commented 6 years ago

What is the motivation for adding / enhancing this feature?

We should follow recommended rules https://vuejs.org/v2/style-guide/#Component-instance-options-order-recommended. Once we provide correct order we can easier/faster work with vue components.

What are the acceptance criteria

Can you complete this feature request by yourself?

YES

Additional information

Here is description of order-in-components property https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/order-in-components.md

filrak commented 6 years ago

From one side I'd say it will make components more readable BUT I also think it will just complicate peoples life and make them deal with countless eslint errors responsible only for reordering components logic. I just don't think this small enhancement is work dealing with all of this .

If it would be my internal company project I would say yes but for open source I'm against. I'm keeping issue open tho to hear more opinions.

szafran89 commented 6 years ago

IMO it would be great to do this and get feedback from contributors (it's fine or wrong). It's not big deal to disable this option again. Of course it will work only for theme b/c in core we have js files instead of vue. In this case our scripts section is not so long (in most cases a few lines). So we should avoid countless eslint errors ;)

Michal-Dziedzinski commented 5 years ago

@filrak did you change your mind? :)