Merge branch 'docs/update-vue-naming-guidelines' into 'master'

Update vue component naming guidelines

See merge request gitlab-org/gitlab-ce!17018
This commit is contained in:
Phil Hughes 2018-02-09 10:29:54 +00:00
commit d997fe135b
2 changed files with 10 additions and 5 deletions

View file

@ -0,0 +1,5 @@
---
title: Update vue component naming guidelines
merge_request: 17018
author: George Tsiolis
type: other

View file

@ -302,20 +302,20 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
#### Naming
1. **Extensions**: Use `.vue` extension for Vue components.
1. **Reference Naming**: Use camelCase for their instances:
1. **Reference Naming**: Use PascalCase for their instances:
```javascript
// bad
import CardBoard from 'cardBoard'
import cardBoard from 'cardBoard.vue'
components: {
CardBoard:
cardBoard,
};
// good
import cardBoard from 'cardBoard'
import CardBoard from 'cardBoard.vue'
components: {
cardBoard:
CardBoard,
};
```