Commit 7f107539 authored by Winnie Hellmann's avatar Winnie Hellmann

Clarify location of Vue templates

parent 31fa9696
...@@ -310,7 +310,7 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation. ...@@ -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 ```javascript
// bad // bad
class Store { class Store {
...@@ -328,9 +328,11 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation. ...@@ -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 #### 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: 1. **Reference Naming**: Use PascalCase for their instances:
```javascript ```javascript
// bad // bad
...@@ -364,6 +366,8 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation. ...@@ -364,6 +366,8 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
<component my-prop="prop" /> <component my-prop="prop" />
``` ```
[#34371]: https://gitlab.com/gitlab-org/gitlab-ce/issues/34371
#### Alignment #### Alignment
1. Follow these alignment styles for the template method: 1. Follow these alignment styles for the template method:
1. With more than one attribute, all attributes should be on a new line: 1. With more than one attribute, all attributes should be on a new line:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment