[meta] List Vue conventions we should standardize on
As I'm getting started with Vue and looking at how we're using it, I see several stylistic variations. We probably shouldn't be too quick to set conventions since we haven't been using it long, and v2.0 might change some things.
And maybe it will just take time for best practices and style conventions to emerge at GitLab. Either way, I think it would be good to be mindful and intentional about how styles evolve. This will be particularly important as new devs or non-frontend devs have to know more than just jquery to work in the code.
I'm imagining this will be a meta issue where we can list conventions we'd like to discuss and check them off as they are added to the frontend styleguide.
-
new Vue config object key indention (e.g. here) -
el
selector type preference (id?) -
the structure of Vue instantiation/initialization (within a class? within an init method? ) -
patterns for referencing the containing class and/or other resources (e.g. here) -
if/when Vue probably won't be a good fit -
is it ever appropriate to use jquery within Vue code? -
alternatives to common reasons we might reach for jquery -
when should Vue components be named? always? -
if/how to interface with non-Vue-ized events and/or views