Add assertion whitespace lint rule (#9931)

* Add assertion whitespace lint rule

* Fix typo

* Add the word `Rule` to Jakefile
This commit is contained in:
Wesley Wigham
2016-07-26 13:29:53 -07:00
committed by GitHub
parent 670f0c91b3
commit e12f2d8232
7 changed files with 45 additions and 35 deletions

View File

@@ -2667,7 +2667,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
isNameOfExportedDeclarationInNonES6Module(node.operand);
if (internalExportChanged) {
emitAliasEqual(<Identifier> node.operand);
emitAliasEqual(<Identifier>node.operand);
}
write(tokenToString(node.operator));
@@ -2722,7 +2722,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}
}
else if (internalExportChanged) {
emitAliasEqual(<Identifier> node.operand);
emitAliasEqual(<Identifier>node.operand);
emit(node.operand);
if (node.operator === SyntaxKind.PlusPlusToken) {
write(" += 1");

View File

@@ -19,7 +19,7 @@ namespace ts.formatting {
public Initialize(rules: Rule[]) {
this.mapRowLength = SyntaxKind.LastToken + 1;
this.map = <any> new Array(this.mapRowLength * this.mapRowLength); // new Array<RulesBucket>(this.mapRowLength * this.mapRowLength);
this.map = <any>new Array(this.mapRowLength * this.mapRowLength); // new Array<RulesBucket>(this.mapRowLength * this.mapRowLength);
// This array is used only during construction of the rulesbucket in the map
const rulesBucketConstructionStateList: RulesBucketConstructionState[] = <any>new Array(this.map.length); // new Array<RulesBucketConstructionState>(this.map.length);

View File

@@ -1082,7 +1082,7 @@ namespace ts {
// fall through
case SyntaxKind.VariableDeclaration:
case SyntaxKind.BindingElement: {
const decl = <VariableDeclaration> node;
const decl = <VariableDeclaration>node;
if (isBindingPattern(decl.name)) {
forEachChild(decl.name, visit);
break;
@@ -2040,7 +2040,7 @@ namespace ts {
function fixupCompilerOptions(options: CompilerOptions, diagnostics: Diagnostic[]): CompilerOptions {
// Lazily create this value to fix module loading errors.
commandLineOptionsStringToEnum = commandLineOptionsStringToEnum || <CommandLineOptionOfCustomType[]>filter(optionDeclarations, o =>
typeof o.type === "object" && !forEachValue(<Map<any>> o.type, v => typeof v !== "number"));
typeof o.type === "object" && !forEachValue(<Map<any>>o.type, v => typeof v !== "number"));
options = clone(options);