diff options
Diffstat (limited to 'doc/development/fe_guide/style/javascript.md')
-rw-r--r-- | doc/development/fe_guide/style/javascript.md | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/doc/development/fe_guide/style/javascript.md b/doc/development/fe_guide/style/javascript.md index a2035eb1b55..f22e3ea6395 100644 --- a/doc/development/fe_guide/style/javascript.md +++ b/doc/development/fe_guide/style/javascript.md @@ -189,24 +189,6 @@ are loaded dynamically with webpack. Do not use `innerHTML`, `append()` or `html()` to set content. It opens up too many vulnerabilities. -## Avoid single-line conditional statements - -Indentation is important when scanning code as it gives a quick indication of the existence of branches, loops, and return points. -This can help to quickly understand the control flow. - -```javascript -// bad -if (isThingNull) return ''; - -if (isThingNull) - return ''; - -// good -if (isThingNull) { - return ''; -} -``` - ## ESLint ESLint behavior can be found in our [tooling guide](../tooling.md). |