style(lint): re-format modules/@angular

This commit is contained in:
Alex Eagle
2016-06-08 16:38:52 -07:00
parent bbed364e7b
commit f39c9c9e75
589 changed files with 21829 additions and 24259 deletions

View File

@ -1,21 +1,6 @@
import {ddescribe, describe, it, iit, expect, beforeEach} from '@angular/core/testing';
import {DirectiveResolver} from '@angular/compiler/src/directive_resolver';
import {
DirectiveMetadata,
Directive,
Input,
Output,
HostBinding,
HostListener,
ContentChildren,
ContentChildrenMetadata,
ViewChildren,
ViewChildrenMetadata,
ContentChild,
ContentChildMetadata,
ViewChild,
ViewChildMetadata
} from '@angular/core/src/metadata';
import {ContentChild, ContentChildMetadata, ContentChildren, ContentChildrenMetadata, Directive, DirectiveMetadata, HostBinding, HostListener, Input, Output, ViewChild, ViewChildMetadata, ViewChildren, ViewChildrenMetadata} from '@angular/core/src/metadata';
import {beforeEach, ddescribe, describe, expect, iit, it} from '@angular/core/testing';
@Directive({selector: 'someDirective'})
class SomeDirective {
@ -28,14 +13,14 @@ class SomeChildDirective extends SomeDirective {
@Directive({selector: 'someDirective', inputs: ['c']})
class SomeDirectiveWithInputs {
@Input() a: any /** TODO #9100 */;
@Input("renamed") b: any /** TODO #9100 */;
@Input('renamed') b: any /** TODO #9100 */;
c: any /** TODO #9100 */;
}
@Directive({selector: 'someDirective', outputs: ['c']})
class SomeDirectiveWithOutputs {
@Output() a: any /** TODO #9100 */;
@Output("renamed") b: any /** TODO #9100 */;
@Output('renamed') b: any /** TODO #9100 */;
c: any /** TODO #9100 */;
}
@ -55,64 +40,59 @@ class SomeDirectiveWithEvents {
@Directive({selector: 'someDirective'})
class SomeDirectiveWithSetterProps {
@Input("renamed")
set a(value: any /** TODO #9100 */) {
}
@Input('renamed')
set a(value: any /** TODO #9100 */) {}
}
@Directive({selector: 'someDirective'})
class SomeDirectiveWithGetterOutputs {
@Output("renamed")
get a(): any /** TODO #9100 */ {
return null;
}
@Output('renamed')
get a(): any /** TODO #9100 */ { return null; }
}
@Directive({selector: 'someDirective', host: {'[c]': 'c'}})
class SomeDirectiveWithHostBindings {
@HostBinding() a: any /** TODO #9100 */;
@HostBinding("renamed") b: any /** TODO #9100 */;
@HostBinding('renamed') b: any /** TODO #9100 */;
c: any /** TODO #9100 */;
}
@Directive({selector: 'someDirective', host: {'(c)': 'onC()'}})
class SomeDirectiveWithHostListeners {
@HostListener('a')
onA() {
}
onA() {}
@HostListener('b', ['$event.value'])
onB(value: any /** TODO #9100 */) {
}
onB(value: any /** TODO #9100 */) {}
}
@Directive({selector: 'someDirective', queries: {"cs": new ContentChildren("c")}})
@Directive({selector: 'someDirective', queries: {'cs': new ContentChildren('c')}})
class SomeDirectiveWithContentChildren {
@ContentChildren("a") as: any;
@ContentChildren('a') as: any;
c: any /** TODO #9100 */;
}
@Directive({selector: 'someDirective', queries: {"cs": new ViewChildren("c")}})
@Directive({selector: 'someDirective', queries: {'cs': new ViewChildren('c')}})
class SomeDirectiveWithViewChildren {
@ViewChildren("a") as: any;
@ViewChildren('a') as: any;
c: any /** TODO #9100 */;
}
@Directive({selector: 'someDirective', queries: {"c": new ContentChild("c")}})
@Directive({selector: 'someDirective', queries: {'c': new ContentChild('c')}})
class SomeDirectiveWithContentChild {
@ContentChild("a") a: any;
@ContentChild('a') a: any;
c: any /** TODO #9100 */;
}
@Directive({selector: 'someDirective', queries: {"c": new ViewChild("c")}})
@Directive({selector: 'someDirective', queries: {'c': new ViewChild('c')}})
class SomeDirectiveWithViewChild {
@ViewChild("a") a: any;
@ViewChild('a') a: any;
c: any /** TODO #9100 */;
}
class SomeDirectiveWithoutMetadata {}
export function main() {
describe("DirectiveResolver", () => {
describe('DirectiveResolver', () => {
var resolver: DirectiveResolver;
beforeEach(() => { resolver = new DirectiveResolver(); });
@ -125,8 +105,9 @@ export function main() {
});
it('should throw if not matching metadata is found', () => {
expect(() => { resolver.resolve(SomeDirectiveWithoutMetadata); })
.toThrowError('No Directive annotation found on SomeDirectiveWithoutMetadata');
expect(() => {
resolver.resolve(SomeDirectiveWithoutMetadata);
}).toThrowError('No Directive annotation found on SomeDirectiveWithoutMetadata');
});
it('should not read parent class Directive metadata', function() {
@ -184,25 +165,25 @@ export function main() {
it('should append ContentChildren', () => {
var directiveMetadata = resolver.resolve(SomeDirectiveWithContentChildren);
expect(directiveMetadata.queries)
.toEqual({"cs": new ContentChildren("c"), "as": new ContentChildren("a")});
.toEqual({'cs': new ContentChildren('c'), 'as': new ContentChildren('a')});
});
it('should append ViewChildren', () => {
var directiveMetadata = resolver.resolve(SomeDirectiveWithViewChildren);
expect(directiveMetadata.queries)
.toEqual({"cs": new ViewChildren("c"), "as": new ViewChildren("a")});
.toEqual({'cs': new ViewChildren('c'), 'as': new ViewChildren('a')});
});
it('should append ContentChild', () => {
var directiveMetadata = resolver.resolve(SomeDirectiveWithContentChild);
expect(directiveMetadata.queries)
.toEqual({"c": new ContentChild("c"), "a": new ContentChild("a")});
.toEqual({'c': new ContentChild('c'), 'a': new ContentChild('a')});
});
it('should append ViewChild', () => {
var directiveMetadata = resolver.resolve(SomeDirectiveWithViewChild);
expect(directiveMetadata.queries)
.toEqual({"c": new ViewChild("c"), "a": new ViewChild("a")});
.toEqual({'c': new ViewChild('c'), 'a': new ViewChild('a')});
});
});
});