mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Remove /*eslint-disable comma-dangle*/ comments
Commit 9d3f7f30ba3ba55cbfd98b26fdd2cc7289716650 reverses the rule, so these comments aren't needed anymore.
This commit is contained in:
@@ -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 = (
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*eslint-disable comma-dangle*/
|
||||
|
||||
'use strict';
|
||||
|
||||
function getDOMNodeToFindDOMNode(file, api, options) {
|
||||
|
||||
@@ -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),
|
||||
]
|
||||
)
|
||||
)
|
||||
),
|
||||
])
|
||||
);
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*eslint-disable comma-dangle*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function(j) {
|
||||
|
||||
Reference in New Issue
Block a user