Until I started using ESLint with your configuration I saw nothing against the rules in this:
$ cat if.js
const [one, two] = [1, 2];
if (one !== two) throw new Error(
'One does not equal two'
);
But ESLint does:
$ eslint if.js
if.js
3:0 error Expected { after 'if' condition curly
✖ 1 problem (1 error, 0 warnings)
Is this intended? In my opinion the pattern I’ve been using is explicit – and more readable than this:
if (one !== two) {
throw new Error(
'One does not equal two'
);
}
The parens form a visual brace-like block much like in #438.
Until I started using ESLint with your configuration I saw nothing against the rules in this:
But ESLint does:
$ eslint if.js if.js 3:0 error Expected { after 'if' condition curly ✖ 1 problem (1 error, 0 warnings)Is this intended? In my opinion the pattern I’ve been using is explicit – and more readable than this:
The parens form a visual brace-like block much like in #438.