Skip to content

Commit f6b2fda

Browse files
committed
refactor: prettier fix
1 parent 4cf528e commit f6b2fda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+167
-197
lines changed

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"ssr:sw": "ng run universal-demo:server:dev --watch",
1212
"ssr:webpack": "webpack --watch",
1313
"ssr:server": "nodemon server.js",
14-
"format:check": "prettier --config ./.prettierrc --list-different \"src/{app,environments,styles}/**/*{.ts,.json,.scss}\"",
14+
"format:check": "prettier --write --config ./.prettierrc --list-different \"src/{app,environments,styles}/**/*{.ts,.json,.scss}\"",
1515
"build": "ng build",
1616
"build:server": "ng run universal-demo:server:production",
1717
"build:prod": "ng build --prod",
@@ -70,6 +70,7 @@
7070
"karma-jasmine": "1.1.2",
7171
"karma-jasmine-html-reporter": "1.3.1",
7272
"nodemon": "1.18.3",
73+
"prettier": "^1.14.3",
7374
"prettier-tslint": "^0.4.0",
7475
"protractor": "5.4.0",
7576
"ssri": "6.0.0",

src/app/app.server.module.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,9 @@ import { InlineStyleModule } from './inline-style/inline-style.module';
2323
ServerTransferStateModule,
2424
InlineStyleModule,
2525
ModuleMapLoaderModule,
26-
TranslatesServerModule
26+
TranslatesServerModule,
2727
],
2828
bootstrap: [AppComponent, InlineStyleComponent],
29-
providers: [
30-
{ provide: AppStorage, useClass: UniversalStorage }
31-
],
29+
providers: [{ provide: AppStorage, useClass: UniversalStorage }],
3230
})
33-
export class AppServerModule {
34-
}
31+
export class AppServerModule {}

src/app/home/home.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { MetaService } from '@ngx-meta/core';
66

77
@Component({
88
selector: 'app-home',
9-
templateUrl: './home.component.html'
9+
templateUrl: './home.component.html',
1010
})
1111
export class HomeComponent implements OnInit {
1212
constructor(
1313
private http: TransferHttpService,
1414
private readonly meta: MetaService,
15-
@Inject(AppStorage) private appStorage: Storage) {
16-
}
15+
@Inject(AppStorage) private appStorage: Storage,
16+
) {}
1717

1818
ngOnInit(): void {
1919
this.appStorage.setItem('test', 'test2');

src/app/home/home.module.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import { HomeRoutes } from './home.routing';
66
import { HomeComponent } from './home.component';
77

88
@NgModule({
9-
imports: [
10-
CommonModule,
11-
HomeRoutes,
12-
TranslateModule
13-
],
14-
declarations: [HomeComponent]
9+
imports: [CommonModule, HomeRoutes, TranslateModule],
10+
declarations: [HomeComponent],
1511
})
16-
export class HomeModule { }
12+
export class HomeModule {}

src/app/home/home.routing.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import { Routes, RouterModule } from '@angular/router';
33

44
const routes: Routes = [
55
{
6-
path: '', component: HomeComponent,
6+
path: '',
7+
component: HomeComponent,
78
data: {
89
meta: {
910
title: 'home.title',
1011
description: 'home.text',
11-
override: true
12-
}
12+
override: true,
13+
},
1314
},
1415
},
1516
];

src/app/inline-style/inline-style.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { Component, ViewEncapsulation } from '@angular/core';
44
selector: 'app-inline-style',
55
template: '',
66
styleUrls: ['./inline-style.component.scss'],
7-
encapsulation: ViewEncapsulation.None
7+
encapsulation: ViewEncapsulation.None,
88
})
9-
10-
export class InlineStyleComponent {
11-
}
9+
export class InlineStyleComponent {}

src/app/mock-server-browser/mock-browser/mock-browser.component.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ import { Component, OnInit } from '@angular/core';
33
@Component({
44
selector: 'app-mock',
55
templateUrl: './mock-browser.component.html',
6-
styleUrls: ['./mock-browser.component.scss']
6+
styleUrls: ['./mock-browser.component.scss'],
77
})
88
export class MockBrowserComponent implements OnInit {
9+
constructor() {}
910

10-
constructor() { }
11-
12-
ngOnInit() {
13-
}
14-
11+
ngOnInit() {}
1512
}

src/app/mock-server-browser/mock-browser/mock-browser.module.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@ import { MockBrowserRoutes } from './mock-browser.routing';
55
import { environment } from '../../../environments/environment';
66

77
@NgModule({
8-
imports: [
9-
CommonModule,
10-
MockBrowserRoutes
11-
],
8+
imports: [CommonModule, MockBrowserRoutes],
129
declarations: [MockBrowserComponent],
13-
exports: [MockBrowserComponent]
10+
exports: [MockBrowserComponent],
1411
})
15-
export class MockBrowserModule {
16-
}
12+
export class MockBrowserModule {}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { Routes, RouterModule } from '@angular/router';
22
import { MockBrowserComponent } from './mock-browser.component';
33

4-
const routes: Routes = [
5-
{ path: 'mock-browser', component: MockBrowserComponent },
6-
];
4+
const routes: Routes = [{ path: 'mock-browser', component: MockBrowserComponent }];
75

86
export const MockBrowserRoutes = RouterModule.forChild(routes);

0 commit comments

Comments
 (0)