Run new lint rules (#5413)

This commit is contained in:
Brian Ng
2017-03-04 09:46:01 -06:00
committed by Henry Zhu
parent f7e2d88f6c
commit 8a82cc060a
181 changed files with 1459 additions and 1454 deletions

View File

@@ -8,7 +8,7 @@ export default function ({ types: t }) {
if (path.parentPath.isCallExpression({ callee: path.node })) {
this.push(path.parentPath);
}
}
},
};
const referenceVisitor = {
@@ -17,7 +17,7 @@ export default function ({ types: t }) {
this.collision = true;
path.skip();
}
}
},
};
const buildObjectDefineProperty = template(`
@@ -32,7 +32,7 @@ export default function ({ types: t }) {
const buildClassPropertySpec = (ref, { key, value, computed }) => buildObjectDefineProperty({
REF: ref,
KEY: (t.isIdentifier(key) && !computed) ? t.stringLiteral(key.name) : key,
VALUE: value ? value : t.identifier("undefined")
VALUE: value ? value : t.identifier("undefined"),
});
const buildClassPropertyNonSpec = (ref, { key, value, computed }) => t.expressionStatement(
@@ -111,7 +111,7 @@ export default function ({ types: t }) {
const collisionState = {
collision: false,
scope: constructor.scope
scope: constructor.scope,
};
for (const prop of props) {
@@ -126,14 +126,14 @@ export default function ({ types: t }) {
t.variableDeclarator(
initialisePropsRef,
t.functionExpression(null, [], t.blockStatement(instanceBody))
)
),
]));
instanceBody = [
t.expressionStatement(
t.callExpression(t.memberExpression(initialisePropsRef, t.identifier("call")), [
t.thisExpression()])
)
),
];
}
@@ -180,7 +180,7 @@ export default function ({ types: t }) {
if (members.some((member) => member.isClassProperty())) {
path.ensureBlock();
}
}
}
},
},
};
}