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:
parent
5706f0531b
commit
bfa69bbdb6
@ -44,6 +44,8 @@ module.exports = {
|
|||||||
"babel/arrow-parens": ["error", "always"],
|
"babel/arrow-parens": ["error", "always"],
|
||||||
// Require a space on each side of arrow operator
|
// Require a space on each side of arrow operator
|
||||||
"arrow-spacing": ["error", { before: true, after: true }],
|
"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
|
// Prevent using => in a condition where <= is intended
|
||||||
"no-confusing-arrow": "error",
|
"no-confusing-arrow": "error",
|
||||||
// prevent no space in `if (){`
|
// prevent no space in `if (){`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user