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
Jérome Perrin
gitlab-ce
Commits
c49a8fb1
Commit
c49a8fb1
authored
Apr 20, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update style_guide_js.md
parent
60a6389a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
doc/development/fe_guide/style_guide_js.md
doc/development/fe_guide/style_guide_js.md
+10
-0
No files found.
doc/development/fe_guide/style_guide_js.md
View file @
c49a8fb1
...
@@ -71,6 +71,16 @@ See [our current .eslintrc][eslintrc] for specific rules and patterns.
...
@@ -71,6 +71,16 @@ See [our current .eslintrc][eslintrc] for specific rules and patterns.
/* global Cookies */
/* global Cookies */
/* global jQuery */
/* global jQuery */
```
```
-
Use up to 3 parameters for a function or class. If you need more accept an Object instead.
```
javascript
// bad
fn
(
p1
,
p2
,
p3
,
p4
)
{}
// good
fn
(
options
)
{}
```
#### Modules, Imports, and Exports
#### Modules, Imports, and Exports
-
Use ES module syntax to import modules
-
Use ES module syntax to import modules
...
...
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