Skip to content

Commit

Permalink
chore(repo): update prettier to v2 (nrwl#2934)
Browse files Browse the repository at this point in the history
this is just for the repo, and not the workspace

Co-authored-by: Rares Matei <[email protected]>
  • Loading branch information
FrozenPandaz and rarmatei authored Apr 29, 2020
1 parent 9b585cb commit e06822d
Show file tree
Hide file tree
Showing 545 changed files with 6,485 additions and 6,410 deletions.
16 changes: 8 additions & 8 deletions .cz-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ module.exports = {
{
value: 'cleanup',
name:
'cleanup: A code change that neither fixes a bug nor adds a feature'
'cleanup: A code change that neither fixes a bug nor adds a feature',
},
{
value: 'chore',
name: "chore: Other changes that don't modify src or test files"
}
name: "chore: Other changes that don't modify src or test files",
},
],

scopes: [
Expand All @@ -28,13 +28,13 @@ module.exports = {
{ name: 'storybook', description: 'anything Storybook specific' },
{
name: 'testing',
description: 'anything testing specific (e.g., jest or cypress)'
description: 'anything testing specific (e.g., jest or cypress)',
},
{
name: 'repo',
description: 'anything related to managing the repo itself'
description: 'anything related to managing the repo itself',
},
{ name: 'misc', description: 'misc stuff' }
{ name: 'misc', description: 'misc stuff' },
],

allowTicketNumber: true,
Expand Down Expand Up @@ -66,7 +66,7 @@ module.exports = {
breaking: 'List any BREAKING CHANGES (optional):\n',
footer:
'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n',
confirmCommit: 'Are you sure you want to proceed with the commit above?'
confirmCommit: 'Are you sure you want to proceed with the commit above?',
},

allowCustomScopes: false,
Expand All @@ -75,7 +75,7 @@ module.exports = {
skipQuestions: ['ticketNumber'],

// limit subject length
subjectLimit: 100
subjectLimit: 100,
// breaklineChar: '|', // It is supported for fields body and footer.
// footerPrefix : 'ISSUES CLOSED:'
// askForBreakingChangeFirst : true, // default is false
Expand Down
28 changes: 14 additions & 14 deletions docs/angular/guides/misc-data-persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class TodoEffects {
// dispatch an undo action to undo the changes in the client state
return {
type: 'UNDO_TODO_UPDATE',
todo: action.todo
todo: action.todo,
};
}
},
})
)
);
Expand Down Expand Up @@ -57,17 +57,17 @@ class TodoEffects {
// update the backend first, and then dispatch an action that will
// update the client side
return this.backend.updateTodo(action.todo.id, action.todo).pipe(
map(updated => ({
map((updated) => ({
type: 'UPDATE_TODO_SUCCESS',
todo: updated
todo: updated,
}))
);
},
onError: (action: UpdateTodo, error: any) => {
// we don't need to undo the changes on the client side.
// we can dispatch an error, or simply log the error here and return `null`
return null;
}
},
})
)
);
Expand All @@ -93,17 +93,17 @@ class TodoEffects {
// provides an action
run: (a: GetTodos) => {
return this.backend.getAll().pipe(
map(response => ({
map((response) => ({
type: 'TODOS',
todos: response.todos
todos: response.todos,
}))
);
},

onError: (action: GetTodos, error: any) => {
// dispatch an undo action to undo the changes in the client state
return null;
}
},
})
)
);
Expand All @@ -130,16 +130,16 @@ class TodoEffects {

// provides an action
run: (todo: GetTodo) => {
return this.backend.getTodo(todo.id).map(response => ({
return this.backend.getTodo(todo.id).map((response) => ({
type: 'LOAD_TODO_SUCCESS',
todo: response.todo
todo: response.todo,
}));
},

onError: (action: GetTodo, error: any) => {
// dispatch an undo action to undo the changes in the client state
return null;
}
},
})
)
);
Expand Down Expand Up @@ -170,9 +170,9 @@ class TodoEffects {
return this.backend
.fetchTodo(activatedRouteSnapshot.params['id'])
.pipe(
map(todo => ({
map((todo) => ({
type: 'LOAD_TODO_SUCCESS',
todo: todo
todo: todo,
}))
);
},
Expand All @@ -184,7 +184,7 @@ class TodoEffects {
// we can log and error here and return null
// we can also navigate back
return null;
}
},
})
)
);
Expand Down
4 changes: 2 additions & 2 deletions docs/angular/guides/misc-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If you have an Angular component that has an AngularJS child component you may n
@Component({
selector: 'app-ticket-list',
templateUrl: './ticket-list.component.html',
styleUrls: ['./ticket-list.component.css']
styleUrls: ['./ticket-list.component.css'],
})
export class TicketListComponent implements OnInit {
@Input() tuskTickets;
Expand All @@ -87,7 +87,7 @@ export class TicketListComponent implements OnInit {
constructor(@Inject('$rootScope') private rootScope: any) {}

onNotifyAll() {
this.notifyList = this.tuskTickets.map(function(t) {
this.notifyList = this.tuskTickets.map(function (t) {
return t.id;
});
// we need to force digest to trigger angularjs change detection
Expand Down
6 changes: 3 additions & 3 deletions docs/angular/guides/react-and-angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ if (environment.production) {

platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
.catch((err) => console.error(err));
```

And the template of the generated component will look as follows:
Expand Down Expand Up @@ -313,7 +313,7 @@ if (environment.production) {

platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
.catch((err) => console.error(err));
```

### Registering CUSTOM_ELEMENTS_SCHEMA
Expand All @@ -326,7 +326,7 @@ Next, let's register the `CUSTOM_ELEMENTS_SCHEMA` schema, which will tell the An
imports: [BrowserModule],
providers: [],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
bootstrap: [AppComponent]
bootstrap: [AppComponent],
})
export class AppModule {}
```
Expand Down
8 changes: 4 additions & 4 deletions docs/angular/guides/storybook-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@ import { text, number, boolean } from '@storybook/addon-knobs';
import { ButtonComponent } from './button.component';

export default {
title: 'ButtonComponent'
title: 'ButtonComponent',
};

export const primary = () => ({
moduleMetadata: {
imports: []
imports: [],
},
component: ButtonComponent,
props: {
text: text('text', 'Click me!'),
padding: number('padding', 0),
style: text('style', 'default')
}
style: text('style', 'default'),
},
});
```

Expand Down
4 changes: 2 additions & 2 deletions docs/angular/tutorial/02-add-e2e-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ describe('TodoApps', () => {
beforeEach(() => cy.visit('/'));

it('should display todos', () => {
getTodos().should(t => expect(t.length).equal(2));
getTodos().should((t) => expect(t.length).equal(2));
getAddTodoButton().click();
getTodos().should(t => expect(t.length).equal(3));
getTodos().should((t) => expect(t.length).equal(3));
});
});
```
Expand Down
6 changes: 3 additions & 3 deletions docs/angular/tutorial/03-display-todos.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface Todo {
@Component({
selector: 'myorg-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
styleUrls: ['./app.component.css'],
})
export class AppComponent {
todos: Todo[] = [{ title: 'Todo 1' }, { title: 'Todo 2' }];
Expand Down Expand Up @@ -53,14 +53,14 @@ interface Todo {
@Component({
selector: 'myorg-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
styleUrls: ['./app.component.css'],
})
export class AppComponent {
todos: Todo[] = [{ title: 'Todo 1' }, { title: 'Todo 2' }];

addTodo() {
this.todos.push({
title: `New todo ${Math.floor(Math.random() * 1000)}`
title: `New todo ${Math.floor(Math.random() * 1000)}`,
});
}
}
Expand Down
6 changes: 3 additions & 3 deletions docs/angular/tutorial/04-connect-to-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { HttpClientModule } from '@angular/common/http';
declarations: [AppComponent],
imports: [BrowserModule, HttpClientModule],
providers: [],
bootstrap: [AppComponent]
bootstrap: [AppComponent],
})
export class AppModule {}
```
Expand All @@ -33,7 +33,7 @@ interface Todo {
@Component({
selector: 'myorg-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
styleUrls: ['./app.component.css'],
})
export class AppComponent {
todos: Todo[] = [];
Expand All @@ -43,7 +43,7 @@ export class AppComponent {
}

fetch() {
this.http.get<Todo[]>('/api/todos').subscribe(t => (this.todos = t));
this.http.get<Todo[]>('/api/todos').subscribe((t) => (this.todos = t));
}

addTodo() {
Expand Down
4 changes: 2 additions & 2 deletions docs/angular/tutorial/05-add-node-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ import { AppService } from './app.service';
@Module({
imports: [],
controllers: [AppController],
providers: [AppService]
providers: [AppService],
})
export class AppModule {}
```
Expand Down Expand Up @@ -150,7 +150,7 @@ export class AppService {
addTodo() {
this.todos.push({
title: `New todo ${Math.floor(Math.random() * 1000)}`
title: `New todo ${Math.floor(Math.random() * 1000)}`,
});
}
}
Expand Down
6 changes: 3 additions & 3 deletions docs/angular/tutorial/07-share-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class AppService {

addTodo() {
this.todos.push({
title: `New todo ${Math.floor(Math.random() * 1000)}`
title: `New todo ${Math.floor(Math.random() * 1000)}`,
});
}
}
Expand All @@ -83,7 +83,7 @@ import { Todo } from '@myorg/data';
@Component({
selector: 'myorg-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
styleUrls: ['./app.component.css'],
})
export class AppComponent {
todos: Todo[] = [];
Expand All @@ -93,7 +93,7 @@ export class AppComponent {
}

fetch() {
this.http.get<Todo[]>('/api/todos').subscribe(t => (this.todos = t));
this.http.get<Todo[]>('/api/todos').subscribe((t) => (this.todos = t));
}

addTodo() {
Expand Down
6 changes: 3 additions & 3 deletions docs/angular/tutorial/08-create-libs.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

@NgModule({
imports: [CommonModule]
imports: [CommonModule],
})
export class UiModule {}
```
Expand Down Expand Up @@ -100,7 +100,7 @@ import { Todo } from '@myorg/data';
@Component({
selector: 'myorg-todos',
templateUrl: './todos.component.html',
styleUrls: ['./todos.component.css']
styleUrls: ['./todos.component.css'],
})
export class TodosComponent implements OnInit {
@Input() todos: Todo[];
Expand Down Expand Up @@ -135,7 +135,7 @@ import { UiModule } from '@myorg/ui';
declarations: [AppComponent],
imports: [BrowserModule, HttpClientModule, UiModule],
providers: [],
bootstrap: [AppComponent]
bootstrap: [AppComponent],
})
export class AppModule {}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/react/tutorial/02-add-e2e-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ describe('TodoApps', () => {
beforeEach(() => cy.visit('/'));

it('should display todos', () => {
getTodos().should(t => expect(t.length).equal(2));
getTodos().should((t) => expect(t.length).equal(2));
getAddTodoButton().click();
getTodos().should(t => expect(t.length).equal(3));
getTodos().should((t) => expect(t.length).equal(3));
});
});
```
Expand Down
Loading

0 comments on commit e06822d

Please sign in to comment.