Skip to content

build: enforce consistent spacing in curly braces #6630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,367 changes: 255 additions & 1,112 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"ts-node": "^3.0.4",
"tsconfig-paths": "^2.2.0",
"tslint": "^5.7.0",
"tslint-eslint-rules": "^4.1.1",
"tsutils": "^2.6.0",
"typescript": "~2.2.1",
"uglify-js": "^2.8.14",
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/a11y/list-key-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ describe('Key managers', () => {
it('should throw if the items do not implement the getLabel method', () => {
const invalidQueryList = new FakeQueryList();

invalidQueryList.items = [{ disabled: false }];
invalidQueryList.items = [{disabled: false}];

const invalidManager = new ListKeyManager(invalidQueryList);

Expand Down
4 changes: 2 additions & 2 deletions src/cdk/observers/observe-content.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ describe('Observe content', () => {
});


@Component({ template: `<div (cdkObserveContent)="doSomething()">{{text}}</div>` })
@Component({template: `<div (cdkObserveContent)="doSomething()">{{text}}</div>`})
class ComponentWithTextContent {
text = '';
doSomething() {}
}

@Component({ template: `<div (cdkObserveContent)="doSomething()"><div>{{text}}<div></div>` })
@Component({template: `<div (cdkObserveContent)="doSomething()"><div>{{text}}<div></div>`})
class ComponentWithChildTextContent {
text = '';
doSomething() {}
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/overlay/overlay-directives.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Overlay directives', () => {
return {getContainerElement: () => overlayContainerElement};
}},
{provide: Directionality, useFactory: () => {
return dir = { value: 'ltr' };
return dir = {value: 'ltr'};
}}
],
});
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/overlay/overlay.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ describe('OverlayContainer theming', () => {
let overlayContainerElement: HTMLElement;

beforeEach(async(() => {
TestBed.configureTestingModule({ imports: [OverlayContainerThemingTestModule] });
TestBed.configureTestingModule({imports: [OverlayContainerThemingTestModule]});
TestBed.compileComponents();
}));

Expand Down
2 changes: 1 addition & 1 deletion src/cdk/overlay/scroll/block-scroll-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {ViewportRuler} from '@angular/cdk/scrolling';
* Strategy that will prevent the user from scrolling while the overlay is visible.
*/
export class BlockScrollStrategy implements ScrollStrategy {
private _previousHTMLStyles = { top: '', left: '' };
private _previousHTMLStyles = {top: '', left: ''};
private _previousScrollPosition: { top: number, left: number };
private _isEnabled = false;

Expand Down
2 changes: 1 addition & 1 deletion src/cdk/portal/portal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ class ArbitraryViewContainerRefComponent {
class PortalTestApp {
@ViewChildren(TemplatePortalDirective) portals: QueryList<TemplatePortalDirective>;
@ViewChild(PortalHostDirective) portalHost: PortalHostDirective;
@ViewChild('templateRef', { read: TemplateRef }) templateRef: TemplateRef<any>;
@ViewChild('templateRef', {read: TemplateRef}) templateRef: TemplateRef<any>;

selectedPortal: Portal<any>;
fruit: string = 'Banana';
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/rxjs/rx-chain.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {RxChain, map, filter, first} from './index';

describe('RxChain', () => {
it('should call all of the operators in the chain', () => {
let operators = { map, filter, first };
let operators = {map, filter, first};

spyOn(operators, 'map');
spyOn(operators, 'filter');
Expand Down
8 changes: 4 additions & 4 deletions src/cdk/testing/event-objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ export function createKeyboardEvent(type: string, keyCode: number, target?: Elem
// Webkit Browsers don't set the keyCode when calling the init function.
// See related bug https://bugs.webkit.org/show_bug.cgi?id=16735
Object.defineProperties(event, {
keyCode: { get: () => keyCode },
key: { get: () => key },
target: { get: () => target }
keyCode: {get: () => keyCode},
key: {get: () => key},
target: {get: () => target}
});

// IE won't set `defaultPrevented` on synthetic events so we need to do it manually.
event.preventDefault = function() {
Object.defineProperty(event, 'defaultPrevented', { get: () => true });
Object.defineProperty(event, 'defaultPrevented', {get: () => true});
return originalPreventDefault.apply(this, arguments);
};

Expand Down
12 changes: 6 additions & 6 deletions src/demo-app/a11y/checkbox/checkbox-a11y.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ export class CheckboxAccessibilityDemo {
name: 'Reminders',
completed: false,
subtasks: [
{ name: 'Cook Dinner', completed: false },
{ name: 'Read the Material Design Spec', completed: false },
{ name: 'Upgrade Application to Angular', completed: false }
{name: 'Cook Dinner', completed: false},
{name: 'Read the Material Design Spec', completed: false},
{name: 'Upgrade Application to Angular', completed: false}
]
},
{
name: 'Groceries',
completed: false,
subtasks: [
{ name: 'Organic Eggs', completed: false },
{ name: 'Protein Powder', completed: false },
{ name: 'Almond Meal Flour', completed: false }
{name: 'Organic Eggs', completed: false},
{name: 'Protein Powder', completed: false},
{name: 'Almond Meal Flour', completed: false}
]
}
];
Expand Down
22 changes: 11 additions & 11 deletions src/demo-app/a11y/chips/chips-a11y.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ export class ChipsAccessibilityDemo {
message: string = '';

people: Person[] = [
{ name: 'Kara' },
{ name: 'Jeremy' },
{ name: 'Topher' },
{ name: 'Elad' },
{ name: 'Kristiyan' },
{ name: 'Paul' }
{name: 'Kara'},
{name: 'Jeremy'},
{name: 'Topher'},
{name: 'Elad'},
{name: 'Kristiyan'},
{name: 'Paul'}
];

displayMessage(message: string): void {
Expand All @@ -39,7 +39,7 @@ export class ChipsAccessibilityDemo {

// Add our person
if ((value || '').trim()) {
this.people.push({ name: value.trim() });
this.people.push({name: value.trim()});
}

// Reset the input value
Expand All @@ -62,9 +62,9 @@ export class ChipsAccessibilityDemo {


availableColors = [
{ name: 'none', color: '' },
{ name: 'Primary', color: 'primary' },
{ name: 'Accent', color: 'accent' },
{ name: 'Warn', color: 'warn' }
{name: 'none', color: ''},
{name: 'Primary', color: 'primary'},
{name: 'Accent', color: 'accent'},
{name: 'Warn', color: 'warn'}
];
}
12 changes: 6 additions & 6 deletions src/demo-app/a11y/grid-list/grid-list-a11y.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ export interface Dog {
})
export class GridListAccessibilityDemo {
dogs: Dog[] = [
{ name: 'Porter', human: 'Kara' },
{ name: 'Mal', human: 'Jeremy' },
{ name: 'Koby', human: 'Igor' },
{ name: 'Razzle', human: 'Ward' },
{ name: 'Molly', human: 'Rob' },
{ name: 'Husi', human: 'Matias' },
{name: 'Porter', human: 'Kara'},
{name: 'Mal', human: 'Jeremy'},
{name: 'Koby', human: 'Igor'},
{name: 'Razzle', human: 'Ward'},
{name: 'Molly', human: 'Rob'},
{name: 'Husi', human: 'Matias'},
];

tiles = [
Expand Down
6 changes: 3 additions & 3 deletions src/demo-app/autocomplete/autocomplete-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ export class AutocompleteDemo {
let group = groups.find(g => g.letter === state.name[0]);

if (!group) {
group = { letter: state.name[0], states: [] };
group = {letter: state.name[0], states: []};
groups.push(group);
}

group.states.push({ code: state.code, name: state.name });
group.states.push({code: state.code, name: state.name});

return groups;
}, [] as StateGroup[]);
Expand All @@ -121,7 +121,7 @@ export class AutocompleteDemo {
filterStateGroups(val: string) {
if (val) {
return this.groupedStates
.map(group => ({ letter: group.letter, states: this._filter(group.states, val) }))
.map(group => ({letter: group.letter, states: this._filter(group.states, val)}))
.filter(group => group.states.length > 0);
}

Expand Down
12 changes: 6 additions & 6 deletions src/demo-app/checkbox/checkbox-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ export class MdCheckboxDemoNestedChecklist {
name: 'Reminders',
completed: false,
subtasks: [
{ name: 'Cook Dinner', completed: false },
{ name: 'Read the Material Design Spec', completed: false },
{ name: 'Upgrade Application to Angular', completed: false }
{name: 'Cook Dinner', completed: false},
{name: 'Read the Material Design Spec', completed: false},
{name: 'Upgrade Application to Angular', completed: false}
]
},
{
name: 'Groceries',
completed: false,
subtasks: [
{ name: 'Organic Eggs', completed: false },
{ name: 'Protein Powder', completed: false },
{ name: 'Almond Meal Flour', completed: false }
{name: 'Organic Eggs', completed: false},
{name: 'Protein Powder', completed: false},
{name: 'Almond Meal Flour', completed: false}
]
}
];
Expand Down
22 changes: 11 additions & 11 deletions src/demo-app/chips/chips-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ export class ChipsDemo {
separatorKeysCodes = [ENTER, COMMA, 186];

people: Person[] = [
{ name: 'Kara' },
{ name: 'Jeremy' },
{ name: 'Topher' },
{ name: 'Elad' },
{ name: 'Kristiyan' },
{ name: 'Paul' }
{name: 'Kara'},
{name: 'Jeremy'},
{name: 'Topher'},
{name: 'Elad'},
{name: 'Kristiyan'},
{name: 'Paul'}
];

availableColors: DemoColor[] = [
{ name: 'none', color: '' },
{ name: 'Primary', color: 'primary' },
{ name: 'Accent', color: 'accent' },
{ name: 'Warn', color: 'warn' }
{name: 'none', color: ''},
{name: 'Primary', color: 'primary'},
{name: 'Accent', color: 'accent'},
{name: 'Warn', color: 'warn'}
];

displayMessage(message: string): void {
Expand All @@ -55,7 +55,7 @@ export class ChipsDemo {

// Add our person
if ((value || '').trim()) {
this.people.push({ name: value.trim() });
this.people.push({name: value.trim()});
}

// Reset the input value
Expand Down
2 changes: 1 addition & 1 deletion src/demo-app/dialog/dialog-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class JazzDialog {
if (this._dimesionToggle) {
this.dialogRef
.updateSize('500px', '500px')
.updatePosition({ top: '25px', left: '25px' });
.updatePosition({top: '25px', left: '25px'});
} else {
this.dialogRef
.updateSize()
Expand Down
12 changes: 6 additions & 6 deletions src/demo-app/grid-list/grid-list-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ export class GridListDemo {
];

dogs: Object[] = [
{ name: 'Porter', human: 'Kara' },
{ name: 'Mal', human: 'Jeremy' },
{ name: 'Koby', human: 'Igor' },
{ name: 'Razzle', human: 'Ward' },
{ name: 'Molly', human: 'Rob' },
{ name: 'Husi', human: 'Matias' },
{name: 'Porter', human: 'Kara'},
{name: 'Mal', human: 'Jeremy'},
{name: 'Koby', human: 'Igor'},
{name: 'Razzle', human: 'Ward'},
{name: 'Molly', human: 'Rob'},
{name: 'Husi', human: 'Matias'},
];

basicRowHeight = 80;
Expand Down
14 changes: 7 additions & 7 deletions src/demo-app/input/input-demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ChangeDetectionStrategy } from '@angular/core';
import {Component, ChangeDetectionStrategy} from '@angular/core';
import {FormControl, Validators} from '@angular/forms';


Expand Down Expand Up @@ -30,11 +30,11 @@ export class InputDemo {
dividerColorExample2: string;
dividerColorExample3: string;
items: any[] = [
{ value: 10 },
{ value: 20 },
{ value: 30 },
{ value: 40 },
{ value: 50 },
{value: 10},
{value: 20},
{value: 30},
{value: 40},
{value: 50},
];
rows = 8;
formControl = new FormControl('hello', Validators.required);
Expand All @@ -48,7 +48,7 @@ export class InputDemo {

addABunch(n: number) {
for (let x = 0; x < n; x++) {
this.items.push({ value: ++max });
this.items.push({value: ++max});
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/demo-app/ripple/ripple-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class RippleDemo {

launchRipple(persistent = false) {
if (this.ripple) {
this.ripple.launch(0, 0, { centered: true, persistent });
this.ripple.launch(0, 0, {centered: true, persistent});
}
}

Expand Down
Loading