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

@ -22,7 +22,7 @@ var createMapFromPairs: {(pairs: List<any>): Map<any, any>} = (function() {
map.set(pair[0], pair[1]);
}
return map;
}
};
})();
var createMapFromMap: {(m: Map<any, any>): Map<any, any>} = (function() {
try {
@ -35,7 +35,7 @@ var createMapFromMap: {(m: Map<any, any>): Map<any, any>} = (function() {
var map = new Map();
m.forEach((v, k) => { map.set(k, v); });
return map;
}
};
})();
var _clearValues: {(m: Map<any, any>)} = (function() {
if ((<any>(new Map()).keys()).next) {
@ -49,7 +49,7 @@ var _clearValues: {(m: Map<any, any>)} = (function() {
} else {
return function _clearValuesWithForeEach(m: Map<any, any>) {
m.forEach((v, k) => { m.set(k, null); });
}
};
}
})();

View File

@ -14,7 +14,7 @@ declare module Intl {
format(value: number): string;
}
var NumberFormat: { new (locale?: string, options?: NumberFormatOptions): NumberFormat; }
var NumberFormat: {new (locale?: string, options?: NumberFormatOptions): NumberFormat};
interface DateTimeFormatOptions {
localeMatcher?: string;
@ -35,7 +35,7 @@ declare module Intl {
format(date?: Date | number): string;
}
var DateTimeFormat: { new (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat; }
var DateTimeFormat: {new (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat};
}
export enum NumberFormatStyle {