Skip to content

Commit

Permalink
tools: enable no-extra-parens in ESLint
Browse files Browse the repository at this point in the history
Enable `no-extra-parens`. This rule restricts the use of parentheses to
only where they are necessary. It is set to be restricted to report only
function expressions.

PR-URL: #5512
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and Myles Borins committed Mar 21, 2016
1 parent 1afab6a commit 131ed49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rules:
no-empty-character-class: 2
no-ex-assign: 2
no-extra-boolean-cast : 2
no-extra-parens: [2, "functions"]
no-extra-semi: 2
no-func-assign: 2
no-invalid-regexp: 2
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ checkAlignment(new Map(big_array.map(function(y) { return [y, null]; })));
}

{
const x = new (function() {});
const x = new function() {};
assert.equal(util.inspect(x), '{}');
}

Expand Down

0 comments on commit 131ed49

Please sign in to comment.