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

@@ -101,7 +101,7 @@ function inferAnnotationFromBinaryExpression(name, path) {
const operator = path.node.operator;
const right = path.get("right").resolve();
const left = path.get("left").resolve();
const left = path.get("left").resolve();
let target;
if (left.isIdentifier({ name })) {
@@ -167,7 +167,7 @@ function getConditionalAnnotation(path, name) {
const ifStatement = getParentConditionalPath(path);
if (!ifStatement) return;
const test = ifStatement.get("test");
const test = ifStatement.get("test");
const paths = [test];
const types = [];
@@ -188,7 +188,7 @@ function getConditionalAnnotation(path, name) {
if (types.length) {
return {
typeAnnotation: t.createUnionTypeAnnotation(types),
ifStatement
ifStatement,
};
} else {
return getConditionalAnnotation(ifStatement, name);