style: add missing semicolons

This commit is contained in:
Joao Dias 2016-10-23 22:52:57 +02:00 committed by vsavkin
parent 52bf188b8f
commit a382d6dd20
15 changed files with 29 additions and 32 deletions

View File

@ -49,9 +49,7 @@ describe('ng2 naive infinite scroll benchmark', function() {
firstTextOf(`${ stageButtons }:enabled`).then(function(text) { firstTextOf(`${ stageButtons }:enabled`).then(function(text) {
expect(text).toEqual('Pitched'); expect(text).toEqual('Pitched');
clickFirstOf(`${ stageButtons }:enabled`).then(function() { clickFirstOf(`${ stageButtons }:enabled`).then(function() {
firstTextOf(`${ stageButtons }:enabled`).then(function(text) { firstTextOf(`${ stageButtons }:enabled`).then((text) => expect(text).toEqual('Won'));
expect(text).toEqual('Won');
})
}); });
}); });

View File

@ -39,7 +39,7 @@ angular.module('app', [])
return { return {
compile: function($element, $attrs) { compile: function($element, $attrs) {
var expr = $parse($attrs.attr0); var expr = $parse($attrs.attr0);
return function($scope) { $scope.$watch(expr, angular.noop); } return ($scope) => $scope.$watch(expr, angular.noop);
} }
}; };
} }
@ -51,7 +51,7 @@ angular.module('app', [])
return { return {
compile: function($element, $attrs) { compile: function($element, $attrs) {
var expr = $parse($attrs.attr1); var expr = $parse($attrs.attr1);
return function($scope) { $scope.$watch(expr, angular.noop); } return ($scope) => $scope.$watch(expr, angular.noop);
} }
}; };
} }
@ -63,7 +63,7 @@ angular.module('app', [])
return { return {
compile: function($element, $attrs) { compile: function($element, $attrs) {
var expr = $parse($attrs.attr2); var expr = $parse($attrs.attr2);
return function($scope) { $scope.$watch(expr, angular.noop); } return ($scope) => $scope.$watch(expr, angular.noop);
} }
}; };
} }
@ -75,7 +75,7 @@ angular.module('app', [])
return { return {
compile: function($element, $attrs) { compile: function($element, $attrs) {
var expr = $parse($attrs.attr3); var expr = $parse($attrs.attr3);
return function($scope) { $scope.$watch(expr, angular.noop); } return ($scope) => $scope.$watch(expr, angular.noop);
} }
}; };
} }
@ -87,7 +87,7 @@ angular.module('app', [])
return { return {
compile: function($element, $attrs) { compile: function($element, $attrs) {
var expr = $parse($attrs.attr4); var expr = $parse($attrs.attr4);
return function($scope) { $scope.$watch(expr, angular.noop); } return ($scope) => $scope.$watch(expr, angular.noop);
} }
}; };
} }

View File

@ -116,4 +116,4 @@ angular.module('app', [])
} }
} }
}; };
}) });

View File

@ -19,7 +19,7 @@ export function main() {
function addTreeDirective(module, level: number) { function addTreeDirective(module, level: number) {
var template; var template;
if (level <= 0) { if (level <= 0) {
template = `<span> {{data.value}}</span>` template = `<span> {{data.value}}</span>`;
} else { } else {
template = `<span> {{data.value}} <tree${level-1} data='data.right'></tree${level-1}><tree${level-1} data='data.left'></tree${level-1}></span>`; template = `<span> {{data.value}} <tree${level-1} data='data.right'></tree${level-1}><tree${level-1} data='data.left'></tree${level-1}></span>`;
} }

View File

@ -19,13 +19,13 @@ var TreeComponent = React.createClass({
var left = null; var left = null;
if (treeNode.left) { if (treeNode.left) {
left = React.createElement( left = React.createElement(
"span", {}, [React.createElement(TreeComponent, {treeNode: treeNode.left}, "")]) "span", {}, [React.createElement(TreeComponent, {treeNode: treeNode.left}, "")]);
} }
var right = null; var right = null;
if (treeNode.right) { if (treeNode.right) {
right = React.createElement( right = React.createElement(
"span", {}, [React.createElement(TreeComponent, {treeNode: treeNode.right}, "")]) "span", {}, [React.createElement(TreeComponent, {treeNode: treeNode.right}, "")]);
} }
var span = React.createElement("span", {}, [" " + treeNode.value, left, right]); var span = React.createElement("span", {}, [" " + treeNode.value, left, right]);

View File

@ -57,10 +57,10 @@ angular.module('app', [])
function(clone) { $element.append(clone); }); function(clone) { $element.append(clone); });
} }
}); });
} };
} }
} };
} }
]) ])
.config([ .config([

View File

@ -73,7 +73,7 @@ class AsyncApplication {
periodicIncrement(): void { periodicIncrement(): void {
this.cancelPeriodicIncrement(); this.cancelPeriodicIncrement();
this.intervalId = setInterval(() => { this.val4++; }, 2000) this.intervalId = setInterval(() => this.val4++, 2000);
}; };
cancelDelayedIncrement(): void { cancelDelayedIncrement(): void {

View File

@ -2121,4 +2121,4 @@ export var data = [
'subject': 'Fwd: wedding photos', 'subject': 'Fwd: wedding photos',
'draft': true 'draft': true
} }
] ];

View File

@ -240,7 +240,7 @@ export class MetadataCollector {
moduleExport.export = exportDeclaration.exportClause.elements.map( moduleExport.export = exportDeclaration.exportClause.elements.map(
element => element.propertyName ? element => element.propertyName ?
{name: element.propertyName.text, as: element.name.text} : {name: element.propertyName.text, as: element.name.text} :
element.name.text) element.name.text);
} }
if (!exports) exports = []; if (!exports) exports = [];
exports.push(moduleExport); exports.push(moduleExport);
@ -300,7 +300,7 @@ export class MetadataCollector {
__symbolic: 'select', __symbolic: 'select',
expression: recordEntry({__symbolic: 'reference', name: enumName}, node), name expression: recordEntry({__symbolic: 'reference', name: enumName}, node), name
} }
} };
} else { } else {
nextDefaultValue = nextDefaultValue =
recordEntry(errorSym('Unsuppported enum member name', member.name), node); recordEntry(errorSym('Unsuppported enum member name', member.name), node);
@ -517,7 +517,7 @@ function validateMetadata(
const entry = metadata[name]; const entry = metadata[name];
try { try {
if (isClassMetadata(entry)) { if (isClassMetadata(entry)) {
validateClass(entry) validateClass(entry);
} }
} catch (e) { } catch (e) {
const node = nodeMap.get(entry); const node = nodeMap.get(entry);

View File

@ -65,7 +65,7 @@ export interface ImportMetadata {
function getSourceFileOfNode(node: ts.Node): ts.SourceFile { function getSourceFileOfNode(node: ts.Node): ts.SourceFile {
while (node && node.kind != ts.SyntaxKind.SourceFile) { while (node && node.kind != ts.SyntaxKind.SourceFile) {
node = node.parent node = node.parent;
} }
return <ts.SourceFile>node; return <ts.SourceFile>node;
} }
@ -383,7 +383,7 @@ export class Evaluator {
module: left.module, module: left.module,
name: qualifiedName.right.text name: qualifiedName.right.text
}, },
node) node);
} }
// Record a type reference to a declared type as a select. // Record a type reference to a declared type as a select.
return {__symbolic: 'select', expression: left, member: qualifiedName.right.text}; return {__symbolic: 'select', expression: left, member: qualifiedName.right.text};

View File

@ -96,7 +96,7 @@ export interface MetadataObject { [name: string]: MetadataValue; }
export interface MetadataArray { [name: number]: MetadataValue; } export interface MetadataArray { [name: number]: MetadataValue; }
export interface MetadataSymbolicExpression { export interface MetadataSymbolicExpression {
__symbolic: 'binary'|'call'|'index'|'new'|'pre'|'reference'|'select'|'spread'|'if' __symbolic: 'binary'|'call'|'index'|'new'|'pre'|'reference'|'select'|'spread'|'if';
} }
export function isMetadataSymbolicExpression(value: any): value is MetadataSymbolicExpression { export function isMetadataSymbolicExpression(value: any): value is MetadataSymbolicExpression {
if (value) { if (value) {

View File

@ -550,7 +550,7 @@ describe('Collector', () => {
arguments: [{providers: [{__symbolic: 'reference', name: 'REQUIRED_VALIDATOR'}]}] arguments: [{providers: [{__symbolic: 'reference', name: 'REQUIRED_VALIDATOR'}]}]
}] }]
} }
}) });
}); });
it('should collect an error for a simple function that references a local variable', () => { it('should collect an error for a simple function that references a local variable', () => {
@ -568,7 +568,7 @@ describe('Collector', () => {
context: {name: 'localSymbol'} context: {name: 'localSymbol'}
} }
} }
}) });
}); });
describe('in strict mode', () => { describe('in strict mode', () => {
@ -588,7 +588,7 @@ describe('Collector', () => {
expect(() => collector.getMetadata(unsupported1, true)) expect(() => collector.getMetadata(unsupported1, true))
.toThrowError(/Reference to non-exported class/); .toThrowError(/Reference to non-exported class/);
}); });
}) });
}); });
// TODO: Do not use \` in a template literal as it confuses clang-format // TODO: Do not use \` in a template literal as it confuses clang-format

View File

@ -57,7 +57,7 @@ describe('Symbols', () => {
it('should be able to find the source files', () => { it('should be able to find the source files', () => {
expect(expressions).toBeDefined(); expect(expressions).toBeDefined();
expect(imports).toBeDefined(); expect(imports).toBeDefined();
}) });
it('should be able to create symbols for a source file', () => { it('should be able to create symbols for a source file', () => {
let symbols = new Symbols(expressions); let symbols = new Symbols(expressions);

View File

@ -114,8 +114,7 @@ export class TscWatch {
} else { } else {
if (this.triggered) { if (this.triggered) {
this.triggered.then( this.triggered.then(
() => this.triggerCmds(), () => this.triggerCmds(), (e) => console.log('Error while running commands....', e));
(e) => {console.log('Error while running commands....', e)});
} else { } else {
this.triggerCmds(); this.triggerCmds();
} }
@ -127,9 +126,9 @@ export class TscWatch {
triggerCmds() { triggerCmds() {
var cmdPromise: Promise<number> = Promise.resolve(0); var cmdPromise: Promise<number> = Promise.resolve(0);
this.onChangeCmds.forEach((cmd: string[] | Command) => {cmdPromise = cmdPromise.then(() => { this.onChangeCmds.forEach(
return this.runCmd(<string[]>cmd); (cmd: string[] | Command) => cmdPromise =
})}); cmdPromise.then(() => this.runCmd(<string[]>cmd)));
cmdPromise.then(() => this.triggered = null, (code) => { cmdPromise.then(() => this.triggered = null, (code) => {
if (this.runOnce) { if (this.runOnce) {
if (typeof code != 'number') { if (typeof code != 'number') {

View File

@ -36,4 +36,4 @@ export default {
router, router,
routerTesting, routerTesting,
upgrade upgrade
} };