From 95edacc994e19431a34c50871fee060ef7fe73f0 Mon Sep 17 00:00:00 2001 From: Benjamin Woodruff Date: Tue, 2 Jun 2015 13:30:13 -0700 Subject: [PATCH] Remove /*eslint-disable comma-dangle*/ comments Commit 9d3f7f30ba3ba55cbfd98b26fdd2cc7289716650 reverses the rule, so these comments aren't needed anymore. --- npm-react-codemod/transforms/class.js | 44 ++++++++++--------- npm-react-codemod/transforms/findDOMNode.js | 2 - .../transforms/pure-render-mixin.js | 6 +-- .../transforms/utils/ReactUtils.js | 2 - 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/npm-react-codemod/transforms/class.js b/npm-react-codemod/transforms/class.js index 1a0d291c4c9f8..6b44fa062c83b 100644 --- a/npm-react-codemod/transforms/class.js +++ b/npm-react-codemod/transforms/class.js @@ -8,8 +8,6 @@ * */ -/*eslint-disable comma-dangle*/ - 'use strict'; function updateReactCreateClassToES6(file, api, options) { @@ -256,12 +254,14 @@ function updateReactCreateClassToES6(file, api, options) { const createSuperCall = shouldAddSuperCall => !shouldAddSuperCall ? [] : - [j.expressionStatement( - j.callExpression( - j.identifier('super'), - [j.identifier('props'), j.identifier('context')] - ) - )]; + [ + j.expressionStatement( + j.callExpression( + j.identifier('super'), + [j.identifier('props'), j.identifier('context')] + ) + ), + ]; const updatePropsAccess = getInitialState => getInitialState ? @@ -323,20 +323,22 @@ function updateReactCreateClassToES6(file, api, options) { } const hasPropsAccess = updatePropsAccess(getInitialState); - return [createMethodDefinition({ - key: j.identifier('constructor'), - value: j.functionExpression( - null, - createConstructorArgs(shouldAddSuperClass, hasPropsAccess), - j.blockStatement( - [].concat( - createSuperCall(shouldAddSuperClass), - autobindFunctions.map(createBindAssignment), - inlineGetInitialState(getInitialState) + return [ + createMethodDefinition({ + key: j.identifier('constructor'), + value: j.functionExpression( + null, + createConstructorArgs(shouldAddSuperClass, hasPropsAccess), + j.blockStatement( + [].concat( + createSuperCall(shouldAddSuperClass), + autobindFunctions.map(createBindAssignment), + inlineGetInitialState(getInitialState) + ) ) - ) - ), - })]; + ), + }), + ]; }; const createES6Class = ( diff --git a/npm-react-codemod/transforms/findDOMNode.js b/npm-react-codemod/transforms/findDOMNode.js index c59334fba0d51..b230845d6836a 100644 --- a/npm-react-codemod/transforms/findDOMNode.js +++ b/npm-react-codemod/transforms/findDOMNode.js @@ -8,8 +8,6 @@ * */ -/*eslint-disable comma-dangle*/ - 'use strict'; function getDOMNodeToFindDOMNode(file, api, options) { diff --git a/npm-react-codemod/transforms/pure-render-mixin.js b/npm-react-codemod/transforms/pure-render-mixin.js index fc30ad4ebd32c..eee03670339aa 100644 --- a/npm-react-codemod/transforms/pure-render-mixin.js +++ b/npm-react-codemod/transforms/pure-render-mixin.js @@ -8,8 +8,6 @@ * */ -/*eslint-disable comma-dangle*/ - 'use strict'; function removePureRenderMixin(file, api, options) { @@ -47,10 +45,10 @@ function removePureRenderMixin(file, api, options) { [ j.thisExpression(), j.identifier(NEXT_PROPS), - j.identifier(NEXT_STATE) + j.identifier(NEXT_STATE), ] ) - ) + ), ]) ); diff --git a/npm-react-codemod/transforms/utils/ReactUtils.js b/npm-react-codemod/transforms/utils/ReactUtils.js index 64dbedc06acda..b18dccc0ee0e2 100644 --- a/npm-react-codemod/transforms/utils/ReactUtils.js +++ b/npm-react-codemod/transforms/utils/ReactUtils.js @@ -8,8 +8,6 @@ * */ -/*eslint-disable comma-dangle*/ - 'use strict'; module.exports = function(j) {