-
-
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 lint
We'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