Skip to content

Commit

Permalink
Remove /*eslint-disable comma-dangle*/ comments
Browse files Browse the repository at this point in the history
Commit 9d3f7f3 reverses the rule, so
these comments aren't needed anymore.
  • Loading branch information
bgw committed Jun 2, 2015
1 parent c089eec commit 95edacc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 29 deletions.
44 changes: 23 additions & 21 deletions npm-react-codemod/transforms/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*
*/

/*eslint-disable comma-dangle*/

'use strict';

function updateReactCreateClassToES6(file, api, options) {
Expand Down Expand Up @@ -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 ?
Expand Down Expand Up @@ -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 = (
Expand Down
2 changes: 0 additions & 2 deletions npm-react-codemod/transforms/findDOMNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*
*/

/*eslint-disable comma-dangle*/

'use strict';

function getDOMNodeToFindDOMNode(file, api, options) {
Expand Down
6 changes: 2 additions & 4 deletions npm-react-codemod/transforms/pure-render-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*
*/

/*eslint-disable comma-dangle*/

'use strict';

function removePureRenderMixin(file, api, options) {
Expand Down Expand Up @@ -47,10 +45,10 @@ function removePureRenderMixin(file, api, options) {
[
j.thisExpression(),
j.identifier(NEXT_PROPS),
j.identifier(NEXT_STATE)
j.identifier(NEXT_STATE),
]
)
)
),
])
);

Expand Down
2 changes: 0 additions & 2 deletions npm-react-codemod/transforms/utils/ReactUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*
*/

/*eslint-disable comma-dangle*/

'use strict';

module.exports = function(j) {
Expand Down

0 comments on commit 95edacc

Please sign in to comment.