From 0199341ed116c55ce995f1afd2b01b477235e927 Mon Sep 17 00:00:00 2001 From: Bruno Leonardo Michels Date: Fri, 15 Jun 2018 22:51:00 -0300 Subject: [PATCH 1/3] Add prettier config --- .prettierrc | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0d89293 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "parser": "typescript", + "arrowParens": "always", + "printWidth": 120, + "singleQuote": true, + "trailingComma": "all" +} From 1391f2da057865a224af39e295e3c090d0cc9065 Mon Sep 17 00:00:00 2001 From: Bruno Leonardo Michels Date: Fri, 15 Jun 2018 22:51:17 -0300 Subject: [PATCH 2/3] Apply prettier on a file --- src/app/app.module.ts | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0a68f3d..32ce11f 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,22 +1,14 @@ -import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app.router'; -import { LayoutComponent } from './shared/layout/layout.component'; -import { RouterModule } from '@angular/router'; import { SharedModule } from './shared/shared.module'; @NgModule({ - declarations: [ - AppComponent, - ], - imports: [ - AppRoutingModule, - BrowserModule, - SharedModule, - ], + declarations: [AppComponent], + imports: [AppRoutingModule, BrowserModule, SharedModule], providers: [], - bootstrap: [AppComponent] + bootstrap: [AppComponent], }) -export class AppModule { } +export class AppModule {} From 70bdae0d0e44e0663344ca6565c6fcc27338ea9d Mon Sep 17 00:00:00 2001 From: Bruno Leonardo Michels Date: Fri, 15 Jun 2018 22:53:57 -0300 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 62746d3..f9f1195 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ Each Pull Request will contain explanation and steps taken to complete a feature ## New project - [Create a new Angular project](https://github.com/brunolm/angular-how-to/pull/1) +- [Add prettier config](https://github.com/brunolm/angular-how-to/pull/10) + +### Upgrades + - ~~[Upgrade from Angular 4 to Angular 5](https://github.com/brunolm/angular-how-to/pull/6)~~ - [Upgrade from Angular 5 to Angular 6](https://github.com/brunolm/angular-how-to/commit/ffa5b2dbfd88f0846ad0bd4b158b4b44a7044bdf) - [Upgrade @angular-cli](https://github.com/brunolm/angular-how-to/pull/8)