Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
7f107539
Commit
7f107539
authored
May 04, 2018
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify location of Vue templates
parent
31fa9696
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
doc/development/fe_guide/style_guide_js.md
doc/development/fe_guide/style_guide_js.md
+6
-2
No files found.
doc/development/fe_guide/style_guide_js.md
View file @
7f107539
...
@@ -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.
Do
n
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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment