-
-
Notifications
You must be signed in to change notification settings - Fork 33
naming conventions
Charles de Beauchesne edited this page Apr 4, 2019
·
1 revision
General rules : if it's not explicitly explained here, please stick to Javascript and Vue conventions :
Here is the command line that will fix most of issues, and warn about others :
npm run lintWe'll list in this document rules that diverges from general standard, and rules that are not present elsewhere.
Folder's names are always kebab-case, no matter what they contains
By "describing", we means which data/object is exported.
- Vue single file components are PascalCase :
MyAwesomeComponent.vue - Javascript
- If the file describes a single object constructor, it must be in PascalCase :
AwesomeObject.vue - If the file describes a singleton/object instance, in must be in kebab-case :
config.js - If the file describes one or more mixins, it must be in kebab-case :
document-mixin.js
- If the file describes a single object constructor, it must be in PascalCase :
Always use kebab-case names for components and properties.
Don't :
<template>
<MyAwesomeComponent FancyProperty="yes" />
</template>Do :
<template>
<my-awesome-component fancy-property="yes" />
</template>- π Home
- π Changelog
- π οΈ Dev environment
- π Resolving issues
- π€ CI/CD
- π Tech docs
- π Courses
- π€ Admin