From 1f22ac353aafb337b5480b6f4bc7b0564c8ea38f Mon Sep 17 00:00:00 2001 From: Justin Ridgewell Date: Sun, 4 Jun 2017 01:34:52 -0400 Subject: [PATCH] Lint --- .../babel-plugin-transform-optional-chaining/src/index.js | 6 +++--- packages/babel-types/src/definitions/core.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/babel-plugin-transform-optional-chaining/src/index.js b/packages/babel-plugin-transform-optional-chaining/src/index.js index ff14c27467..1687a945ca 100644 --- a/packages/babel-plugin-transform-optional-chaining/src/index.js +++ b/packages/babel-plugin-transform-optional-chaining/src/index.js @@ -46,7 +46,7 @@ export default function ({ types: t }) { if (loose) { // To avoid a Function#call, we can instead re-grab the property from the context object. // `a.?b.?()` translates roughly to `_a.b != null && _a.b()` - node.callee = chain + node.callee = chain; } else { // Otherwise, we need to memoize the context object, and change the call into a Function#call. // `a.?b.?()` translates roughly to `(_b = _a.b) != null && _b.call(_a)` @@ -82,7 +82,7 @@ export default function ({ types: t }) { return; } - const replace = path.find(path => { + const replace = path.find((path) => { const { parentPath } = path; if (parentPath.isStatement()) { return true; @@ -97,7 +97,7 @@ export default function ({ types: t }) { if (path.key == "callee" && (parentPath.isCallExpression() || parentPath.isNewExpression())) { return false; } - if (path.key == "argument" && parentPath.isUnaryExpression({ operator: "delete"})) { + if (path.key == "argument" && parentPath.isUnaryExpression({ operator: "delete" })) { return false; } return true; diff --git a/packages/babel-types/src/definitions/core.js b/packages/babel-types/src/definitions/core.js index 8cfaa756b0..8cbecc3d6e 100644 --- a/packages/babel-types/src/definitions/core.js +++ b/packages/babel-types/src/definitions/core.js @@ -440,7 +440,7 @@ defineType("MemberExpression", { optional: { validate: assertOneOf(true, false), optional: true, - } + }, }, });