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) {
expect(text).toEqual('Pitched');
clickFirstOf(`${ stageButtons }:enabled`).then(function() {
firstTextOf(`${ stageButtons }:enabled`).then(function(text) {
expect(text).toEqual('Won');
})
firstTextOf(`${ stageButtons }:enabled`).then((text) => expect(text).toEqual('Won'));
});
});

View File

@ -39,7 +39,7 @@ angular.module('app', [])
return {
compile: function($element, $attrs) {
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 {
compile: function($element, $attrs) {
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 {
compile: function($element, $attrs) {
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 {
compile: function($element, $attrs) {
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 {
compile: function($element, $attrs) {
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) {
var template;
if (level <= 0) {
template = `<span> {{data.value}}</span>`
template = `<span> {{data.value}}</span>`;
} else {
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;
if (treeNode.left) {
left = React.createElement(
"span", {}, [React.createElement(TreeComponent, {treeNode: treeNode.left}, "")])
"span", {}, [React.createElement(TreeComponent, {treeNode: treeNode.left}, "")]);
}
var right = null;
if (treeNode.right) {
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]);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -550,7 +550,7 @@ describe('Collector', () => {
arguments: [{providers: [{__symbolic: 'reference', name: 'REQUIRED_VALIDATOR'}]}]
}]
}
})
});
});
it('should collect an error for a simple function that references a local variable', () => {
@ -568,7 +568,7 @@ describe('Collector', () => {
context: {name: 'localSymbol'}
}
}
})
});
});
describe('in strict mode', () => {
@ -588,7 +588,7 @@ describe('Collector', () => {
expect(() => collector.getMetadata(unsupported1, true))
.toThrowError(/Reference to non-exported class/);
});
})
});
});
// 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', () => {
expect(expressions).toBeDefined();
expect(imports).toBeDefined();
})
});
it('should be able to create symbols for a source file', () => {
let symbols = new Symbols(expressions);

View File

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

View File

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