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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8913d27c
Commit
8913d27c
authored
7 years ago
by
Filipa Lacerda
Committed by
Alfredo Sumaran
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds entry about kebab case props in documentation
parent
a9b1a85b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
doc/development/fe_guide/style_guide_js.md
doc/development/fe_guide/style_guide_js.md
+11
-4
No files found.
doc/development/fe_guide/style_guide_js.md
View file @
8913d27c
...
...
@@ -200,7 +200,6 @@ See [our current .eslintrc][eslintrc] for specific rules and patterns.
#### Naming
-
**Extensions**
: Use
`.vue`
extension for Vue components.
-
**Reference Naming**
: Use PascalCase for Vue components and camelCase for their instances:
```
javascript
// bad
import
cardBoard
from
'
cardBoard
'
;
...
...
@@ -218,15 +217,23 @@ See [our current .eslintrc][eslintrc] for specific rules and patterns.
cardBoard
:
CardBoard
};
```
-
**Props Naming**
: Avoid using DOM component prop names.
-
**Props Naming:**
-
Avoid using DOM component prop names.
-
Use kebab-case instead of camelCase to provide props in templates.
```
javascript
// bad
<
component
class
=
"
btn
"
>
// good
<
component
cssClass
=
"
btn
"
>
```
<
component
css
-
class
=
"
btn
"
>
// bad
<
component
myProp
=
"
prop
"
/>
// good
<
component
my
-
prop
=
"
prop
"
/>
```
#### Alignment
- Follow these alignment styles for the template method:
...
...
This diff is collapsed.
Click to expand it.
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