diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-04-20 18:14:01 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-04-20 18:14:01 +0000 |
commit | b8b6ab6b91c05350e6fc50f21273ca18237af858 (patch) | |
tree | ea347d9f1a20ce0a036e844ffc6117c3da516884 | |
parent | 60a6389a7223f14156aeeec9a3854f8ea88de1f0 (diff) | |
parent | c49a8fb1be1d03292ec8974f2f96ce7b46139dd1 (diff) | |
download | gitlab-ce-b8b6ab6b91c05350e6fc50f21273ca18237af858.tar.gz |
Merge branch 'fe-doc-update' into 'master'
Add parameter limit to styleguide
See merge request !10830
-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 |