From bfa69bbdb63e44d95afdfb7586c7bfb214c83990 Mon Sep 17 00:00:00 2001 From: Bo Borgerson Date: Fri, 2 Sep 2016 15:48:46 -0700 Subject: [PATCH] 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. --- eslint/babel-eslint-config-internal/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eslint/babel-eslint-config-internal/index.js b/eslint/babel-eslint-config-internal/index.js index 2643eaf350..925c837072 100644 --- a/eslint/babel-eslint-config-internal/index.js +++ b/eslint/babel-eslint-config-internal/index.js @@ -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 (){`