diff options
author | Fatih Acet <acetfatih@gmail.com> | 2017-04-20 16:39:56 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-04-20 16:39:56 +0000 |
commit | c49a8fb1be1d03292ec8974f2f96ce7b46139dd1 (patch) | |
tree | ea347d9f1a20ce0a036e844ffc6117c3da516884 /doc/development | |
parent | 60a6389a7223f14156aeeec9a3854f8ea88de1f0 (diff) | |
download | gitlab-ce-c49a8fb1be1d03292ec8974f2f96ce7b46139dd1.tar.gz |
Update style_guide_js.mdfe-doc-update
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/fe_guide/style_guide_js.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/development/fe_guide/style_guide_js.md b/doc/development/fe_guide/style_guide_js.md index 038a689c09a..1d2b0558948 100644 --- a/doc/development/fe_guide/style_guide_js.md +++ b/doc/development/fe_guide/style_guide_js.md @@ -71,6 +71,16 @@ See [our current .eslintrc][eslintrc] for specific rules and patterns. /* global Cookies */ /* 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 - Use ES module syntax to import modules |