chore(lint): require semicolons

Relying on ASI (automatic semicolon insertion)
is allowed in TypeScript because JavaScript allows
it. However, when we run clang-format it doesn’t
understand that these statements are terminated
with a newline and changes the indentation, in bad
cases even breaking the code.

Fixes #817
This commit is contained in:
Alex Eagle
2015-07-15 12:12:23 -07:00
parent 33500e986b
commit 93055f78ea
21 changed files with 32 additions and 32 deletions

View File

@ -52,7 +52,7 @@ export interface ViewDecorator extends TypeDecorator {
renderer?: string,
styles?: List<string>,
styleUrls?: List<string>,
}): ViewDecorator
}): ViewDecorator;
}
/**

View File

@ -300,7 +300,7 @@ export function bootstrap(appComponentType: Type,
bootstrapProcess.resolve(new ApplicationRef(componentRef, appComponentType, appInjector));
};
PromiseWrapper.then(compRefToken, tick,
(err, stackTrace) => {bootstrapProcess.reject(err, stackTrace)});
(err, stackTrace) => bootstrapProcess.reject(err, stackTrace));
});
return bootstrapProcess.promise;

View File

@ -100,7 +100,7 @@ export class AppViewManagerUtils {
if (atIndex == 0) {
sibling = null;
} else {
sibling = ListWrapper.last(viewContainer.views[atIndex - 1].rootElementInjectors)
sibling = ListWrapper.last(viewContainer.views[atIndex - 1].rootElementInjectors);
}
var elementInjector = contextView.elementInjectors[contextBoundElementIndex];
for (var i = view.rootElementInjectors.length - 1; i >= 0; i--) {

View File

@ -62,7 +62,7 @@ export class NgZone {
if (global.zone) {
this._disabled = false;
this._mountZone = global.zone;
this._innerZone = this._createInnerZone(this._mountZone, enableLongStackTrace)
this._innerZone = this._createInnerZone(this._mountZone, enableLongStackTrace);
} else {
this._disabled = true;
this._mountZone = null;
@ -159,9 +159,9 @@ export class NgZone {
if (enableLongStackTrace) {
errorHandling = StringMapWrapper.merge(Zone.longStackTraceZone,
{onError: function(e) { ngZone._onError(this, e) }});
{onError: function(e) { ngZone._onError(this, e); }});
} else {
errorHandling = {onError: function(e) { ngZone._onError(this, e) }};
errorHandling = {onError: function(e) { ngZone._onError(this, e); }};
}
return zone.fork(errorHandling)
@ -200,7 +200,7 @@ export class NgZone {
}
}
}
}
};
},
'$scheduleMicrotask': function(parentScheduleMicrotask) {
return function(fn) {
@ -213,7 +213,7 @@ export class NgZone {
}
};
parentScheduleMicrotask.call(this, microtask);
}
};
},
_innerZone: true
});