Add the "space-infix-ops" rule (babel/eslint-config-babel#1)

Require whitespace around infix operators.

The babel code base already mostly satisfies this.  Nice to keep it that way.

This is used by Lerna, too.
This commit is contained in:
Bo Borgerson 2016-09-02 15:48:46 -07:00
parent 5706f0531b
commit bfa69bbdb6

View File

@ -44,6 +44,8 @@ module.exports = {
"babel/arrow-parens": ["error", "always"],
// Require a space on each side of arrow operator
"arrow-spacing": ["error", { before: true, after: true }],
// Require a space on each side of all infix operators
"space-infix-ops": "error",
// Prevent using => in a condition where <= is intended
"no-confusing-arrow": "error",
// prevent no space in `if (){`