Commit 3d1d87de authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'remove-incorrect-docs' into 'master'

Remove docs discouraging single-line conditionals

See merge request gitlab-org/gitlab!77598
parents 2e85fc86 49b672bb
......@@ -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).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment