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) {