Merge branch 'winh-vue-templates-docs' into 'master'
Clarify location of Vue templates See merge request gitlab-org/gitlab-ce!18733
This commit is contained in:
commit
4cfa8168a2
|
@ -310,7 +310,7 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
|
|||
}));
|
||||
```
|
||||
|
||||
1. Don not use a singleton for the service or the store
|
||||
1. Do not use a singleton for the service or the store
|
||||
```javascript
|
||||
// bad
|
||||
class Store {
|
||||
|
@ -328,9 +328,11 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
|
|||
}
|
||||
}
|
||||
```
|
||||
1. Use `.vue` for Vue templates. Do not use `%template` in HAML.
|
||||
|
||||
#### Naming
|
||||
1. **Extensions**: Use `.vue` extension for Vue components.
|
||||
|
||||
1. **Extensions**: Use `.vue` extension for Vue components. Do not use `.js` as file extension ([#34371]).
|
||||
1. **Reference Naming**: Use PascalCase for their instances:
|
||||
```javascript
|
||||
// bad
|
||||
|
@ -364,6 +366,8 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
|
|||
<component my-prop="prop" />
|
||||
```
|
||||
|
||||
[#34371]: https://gitlab.com/gitlab-org/gitlab-ce/issues/34371
|
||||
|
||||
#### Alignment
|
||||
1. Follow these alignment styles for the template method:
|
||||
1. With more than one attribute, all attributes should be on a new line:
|
||||
|
|
Loading…
Reference in New Issue