eslint: add space-after-keywords

This commit is contained in:
Henry Zhu 2015-12-06 11:30:07 -05:00
parent f52b8f9e99
commit d06cfe63c2
10 changed files with 17 additions and 16 deletions

View File

@ -74,6 +74,7 @@
"avoid-escape"
],
"no-var": 2,
"space-after-keywords": 2,
"strict": 0,
"no-underscore-dangle": 0,
"curly": 0,

View File

@ -23,7 +23,7 @@ export default async function () {
}
parts.pop();
} while(parts.length);
} while (parts.length);
return [false, "Found no .babelrc config"];
}

View File

@ -369,7 +369,7 @@ export default class File extends Store {
column: mapping.generatedColumn,
source: source
});
if(generatedPosition.column != null) {
if (generatedPosition.column != null) {
mergedGenerator.addMapping({
source: mapping.source,

View File

@ -41,7 +41,7 @@ export default function ({ types: t }) {
let { node } = path;
do {
node = node.expression;
} while(t.isTypeCastExpression(node));
} while (t.isTypeCastExpression(node));
path.replaceWith(node);
}
}

View File

@ -46,7 +46,7 @@ export function getStatementParent() {
if (Array.isArray(path.container)) {
return path;
}
} while(path = path.parentPath);
} while (path = path.parentPath);
}
/**
@ -120,7 +120,7 @@ export function getDeepestCommonAncestorFrom(paths: Array<NodePath>, filter?: Fu
do {
ancestry.unshift(path);
} while((path = path.parentPath) && path !== this);
} while ((path = path.parentPath) && path !== this);
// save min depth to avoid going too far in
if (ancestry.length < minDepth) {
@ -171,7 +171,7 @@ export function getAncestry() {
let paths = [];
do {
paths.push(path);
} while(path = path.parentPath);
} while (path = path.parentPath);
return paths;
}
@ -212,6 +212,6 @@ export function inShadow(key?) {
// normal function, we've found our function context
return null;
}
} while(path = path.parentPath);
} while (path = path.parentPath);
return null;
}

View File

@ -149,7 +149,7 @@ export default class NodePath {
let key = path.key;
if (path.inList) key = `${path.listKey}[${key}]`;
parts.unshift(key);
} while(path = path.parentPath);
} while (path = path.parentPath);
return parts.join(".");
}

View File

@ -175,7 +175,7 @@ function getConditionalAnnotation(path, name) {
let type = inferAnnotationFromBinaryExpression(name, path);
if (type) types.push(type);
}
} while(paths.length);
} while (paths.length);
if (types.length) {
return {

View File

@ -57,7 +57,7 @@ export default class PathHoister {
if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
break;
}
} while(scope = scope.parent);
} while (scope = scope.parent);
}
getAttachmentPath() {

View File

@ -404,7 +404,7 @@ export default class Scope {
kind: binding.kind
});
}
} while(scope = scope.parent);
} while (scope = scope.parent);
console.log(sep);
}
@ -618,7 +618,7 @@ export default class Scope {
do {
let data = scope.data[key];
if (data != null) return data;
} while(scope = scope.parent);
} while (scope = scope.parent);
}
/**
@ -631,7 +631,7 @@ export default class Scope {
do {
let data = scope.data[key];
if (data != null) scope.data[key] = null;
} while(scope = scope.parent);
} while (scope = scope.parent);
}
init() {
@ -931,6 +931,6 @@ export default class Scope {
if (scope.uids[name]) {
scope.uids[name] = false;
}
} while(scope = scope.parent);
} while (scope = scope.parent);
}
}

View File

@ -113,7 +113,7 @@ pp.flowParseInterfaceish = function (node, allowStatic) {
if (this.eat(tt._extends)) {
do {
node.extends.push(this.flowParseInterfaceExtends());
} while(this.eat(tt.comma));
} while (this.eat(tt.comma));
}
node.body = this.flowParseObjectType(allowStatic);
@ -876,7 +876,7 @@ export default function (instance) {
node.typeParameters = null;
}
implemented.push(this.finishNode(node, "ClassImplements"));
} while(this.eat(tt.comma))
} while (this.eat(tt.comma))
}
};
});