Skip to content

Commit e65f750

Browse files
authored
style(store): remove prettier overrides (#30)
1 parent 6b3dd8a commit e65f750

Some content is hidden

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

43 files changed

+483
-487
lines changed

packages/store/.prettierignore

-3
This file was deleted.

packages/store/.prettierrc

-4
This file was deleted.

packages/store/CHANGELOG.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ You can now create an encapsulated 'sub-store' that only operates on a section o
161161
```typescript
162162
const subStore = ngRedux.configureSubStore(
163163
['path', 'to', 'somewhere'],
164-
localReducer
164+
localReducer,
165165
);
166166
```
167167

@@ -210,7 +210,7 @@ export class AnimalActions {
210210
@dispatch()
211211
loadAnimals = (animalType: AnimalType): Action => ({
212212
type: AnimalActions.LOAD_ANIMALS,
213-
meta: { animalType }
213+
meta: { animalType },
214214
});
215215

216216
// ...
@@ -356,7 +356,7 @@ import { NgReduxModule } from 'ng2-redux';
356356
declarations: [AppComponent],
357357
imports: [NgReduxModule.forRoot(), BrowserModule],
358358
providers: [],
359-
bootstrap: [AppComponent]
359+
bootstrap: [AppComponent],
360360
})
361361
class AppModule {
362362
// etc.
@@ -374,7 +374,7 @@ import { NgReduxModule } from 'ng2-redux';
374374
declarations: [AppComponent],
375375
imports: [NgReduxModule, BrowserModule],
376376
providers: [],
377-
bootstrap: [AppComponent]
377+
bootstrap: [AppComponent],
378378
})
379379
class AppModule {
380380
// etc.
@@ -439,7 +439,7 @@ import { rootReducer } from './store';
439439
declarations: [AppComponent],
440440
imports: [NgReduxModule, BrowserModule],
441441
providers: [],
442-
bootstrap: [AppComponent]
442+
bootstrap: [AppComponent],
443443
})
444444
export class AppModule {
445445
constructor(ngRedux: NgRedux<IAppState>) {
@@ -566,20 +566,20 @@ import {
566566
Store,
567567
combineReducers,
568568
compose,
569-
createStore
569+
createStore,
570570
} from 'redux';
571571
import thunk from 'redux-thunk';
572572
import reduxLogger from 'redux-logger';
573573

574574
import { myReducer } from './reducers/my-reducer';
575575

576576
const rootReducer = combineReducers({
577-
myReducer
577+
myReducer,
578578
});
579579

580580
export const store = createStore(
581581
rootReducer,
582-
compose(applyMiddleware(thunk, reduxLogger))
582+
compose(applyMiddleware(thunk, reduxLogger)),
583583
) as Store;
584584
```
585585

@@ -681,7 +681,7 @@ const middleware = [createLogger()];
681681
const enhancers = [persistState('counter', { key: 'example-app' })];
682682
const store = compose(
683683
applyMiddleware(middleware),
684-
...enhancers
684+
...enhancers,
685685
)(createStore)(rootReducer);
686686

687687
bootstrap(App, [provide(store)]);

packages/store/articles/action-creator-service.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { RandomNumberService } from '../services/random-number';
2424
export class CounterActions {
2525
constructor(
2626
private ngRedux: NgRedux<RootState>,
27-
private randomNumberService: RandomNumberService
27+
private randomNumberService: RandomNumberService,
2828
) {}
2929

3030
static INCREMENT_COUNTER: string = 'INCREMENT_COUNTER';
@@ -58,7 +58,7 @@ export class CounterActions {
5858
randomize(): void {
5959
this.ngRedux.dispatch({
6060
type: CounterActions.RANDOMIZE_COUNTER,
61-
payload: this.randomNumberService.pick()
61+
payload: this.randomNumberService.pick(),
6262
});
6363
}
6464
}
@@ -85,7 +85,7 @@ import { RandomNumberService } from '../services/random-number';
8585
<button (click)="actions.incrementAsync(2222)">Increment async</button>
8686
<button (click)="actions.randomize()">Set to random number</button>
8787
</p>
88-
`
88+
`,
8989
})
9090
export class Counter {
9191
@select('counter') counter$: any;

packages/store/articles/di-middleware.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ import { LogRemoteName } from './middleware/log-remote-name';
4646
/* ... */
4747
imports: [, /* ... */ NgReduxModule],
4848
providers: [
49-
LogRemoteName
49+
LogRemoteName,
5050
/* ... */
51-
]
51+
],
5252
})
5353
export class AppModule {
5454
constructor(
5555
private ngRedux: NgRedux<IAppState>,
56-
logRemoteName: LogRemoteName
56+
logRemoteName: LogRemoteName,
5757
) {
5858
const middleware = [reduxLogger, logRemoteName.middleware];
5959
this.ngRedux.configureStore(rootReducer, {}, middleware);

packages/store/articles/epics.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class SessionActions {
2828
loginUser(credentials) {
2929
this.ngRedux.dispatch({
3030
type: SessionActions.LOGIN_USER,
31-
payload: credentials
31+
payload: credentials,
3232
});
3333
}
3434

@@ -65,12 +65,12 @@ export class SessionEpics {
6565
.post(`${BASE_URL}/auth/login`, payload)
6666
.map(result => ({
6767
type: SessionActions.LOGIN_USER_SUCCESS,
68-
payload: result.json().meta
68+
payload: result.json().meta,
6969
}))
7070
.catch(error =>
7171
Observable.of({
72-
type: SessionActions.LOGIN_USER_ERROR
73-
})
72+
type: SessionActions.LOGIN_USER_ERROR,
73+
}),
7474
);
7575
});
7676
};
@@ -96,14 +96,14 @@ import { SessionEpics } from './epics';
9696
/* ... */
9797
imports: [, /* ... */ NgReduxModule],
9898
providers: [
99-
SessionEpics
99+
SessionEpics,
100100
/* ... */
101-
]
101+
],
102102
})
103103
export class AppModule {
104104
constructor(
105105
private ngRedux: NgRedux<IAppState>,
106-
private epics: SessionEpics
106+
private epics: SessionEpics,
107107
) {
108108
const middleware = [createEpicMiddleware(this.epics.login)];
109109
ngRedux.configureStore(rootReducer, {}, middleware);

packages/store/articles/fractal-store.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const userComponentReducer = (state, action) =>
5050
<p>occupation: {{ occupation$ | async }}</p>
5151
<p>lines of code: {{ loc$ | async }}</p>
5252
   <button (click)=addCode(100)>Add 100 lines of code</button>
53-
`
53+
`,
5454
})
5555
export class UserComponent implements NgOnInit {
5656
@Input() userId: String;
@@ -68,7 +68,7 @@ export class UserComponent implements NgOnInit {
6868
// in the top-level store.
6969
this.subStore = this.ngRedux.configureSubStore(
7070
['users', userId],
71-
userComponentReducer
71+
userComponentReducer,
7272
);
7373

7474
// Substore selectons are scoped to the base path used to configure
@@ -129,11 +129,11 @@ export const defaultToZero = (obs$: Observable<number>) =>
129129
<p>occupation: {{ occupation$ | async }}</p>
130130
<p>lines of code: {{ loc$ | async }}</p>
131131
   <button (click)=addCode(100)>Add 100 lines of code</button>
132-
`
132+
`,
133133
})
134134
@WithSubStore({
135135
basePathMethodName: 'getBasePath',
136-
localReducer: userComponentReducer
136+
localReducer: userComponentReducer,
137137
})
138138
export class UserComponent implements NgOnInit {
139139
@Input() userId: String;

packages/store/articles/immutable-js.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ can no longer easily dereference properties:
2525

2626
```typescript
2727
const mutableFoo = {
28-
foo: 1
28+
foo: 1,
2929
};
3030

3131
const foo: number = mutableFoo.foo;
@@ -89,8 +89,8 @@ Immutable.Map<string, any>({
8989
totalCount: 0,
9090
counts: Immutable.map<string, number>({
9191
firstCount: 0,
92-
secondCount: 0
93-
})
92+
secondCount: 0,
93+
}),
9494
});
9595
```
9696

packages/store/articles/intro-tutorial.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ import { AppComponent } from './app.component';
5555
BrowserModule,
5656
FormsModule,
5757
HttpModule,
58-
NgReduxModule // <- New
58+
NgReduxModule, // <- New
5959
],
6060
providers: [],
61-
bootstrap: [AppComponent]
61+
bootstrap: [AppComponent],
6262
})
6363
export class AppModule {}
6464
```
@@ -89,7 +89,7 @@ import { Component } from '@angular/core';
8989
@Component({
9090
selector: 'app-root',
9191
templateUrl: './app.component.html',
92-
styleUrls: ['./app.component.css']
92+
styleUrls: ['./app.component.css'],
9393
})
9494
export class AppComponent {
9595
title = 'app works!';
@@ -151,7 +151,7 @@ const nextValueOfCount = streamOfActions.reduce(
151151

152152
return state;
153153
},
154-
{ count: 0 }
154+
{ count: 0 },
155155
);
156156
```
157157

@@ -192,7 +192,7 @@ export interface IAppState {
192192
}
193193

194194
export const INITIAL_STATE: IAppState = {
195-
count: 0
195+
count: 0,
196196
};
197197

198198
export function rootReducer(lastState: IAppState, action: Action): IAppState {
@@ -230,7 +230,7 @@ import { CounterActions } from './app.actions'; // <- New
230230
declarations: [AppComponent],
231231
imports: [BrowserModule, FormsModule, HttpModule, NgReduxModule],
232232
providers: [CounterActions], // <- New
233-
bootstrap: [AppComponent]
233+
bootstrap: [AppComponent],
234234
})
235235
export class AppModule {
236236
constructor(ngRedux: NgRedux<IAppState>) {
@@ -273,7 +273,7 @@ ends up looking conceptually a bit like this:
273273
// Pseudocode
274274
const finalAppState: IAppState = actionsOverTime.reduce(
275275
rootReducer,
276-
INITIAL_STATE
276+
INITIAL_STATE,
277277
);
278278
```
279279

@@ -306,7 +306,7 @@ import { IAppState } from '../store'; // <- New
306306
@Component({
307307
selector: 'app-root',
308308
templateUrl: './app.component.html',
309-
styleUrls: ['./app.component.css']
309+
styleUrls: ['./app.component.css'],
310310
})
311311
export class AppComponent {
312312
title = 'app works!';
@@ -315,7 +315,7 @@ export class AppComponent {
315315
constructor(
316316
// <- New
317317
private ngRedux: NgRedux<IAppState>, // <- New
318-
private actions: CounterActions
318+
private actions: CounterActions,
319319
) {} // <- New
320320

321321
increment() {
@@ -350,7 +350,7 @@ export class AppComponent implements OnDestroy {
350350

351351
constructor(
352352
private ngRedux: NgRedux<IAppState>,
353-
private actions: CounterActions
353+
private actions: CounterActions,
354354
) {
355355
this.subscription = ngRedux
356356
.select<number>('count') // <- New
@@ -447,15 +447,15 @@ import { Observable } from 'rxjs/Observable';
447447
@Component({
448448
selector: 'app-root',
449449
templateUrl: './app.component.html',
450-
styleUrls: ['./app.component.css']
450+
styleUrls: ['./app.component.css'],
451451
})
452452
export class AppComponent {
453453
title = 'app works!';
454454
@select() readonly count$: Observable<number>; // <- Changed
455455

456456
constructor(
457457
private actions: CounterActions,
458-
private ngRedux: NgRedux<IAppState>
458+
private ngRedux: NgRedux<IAppState>,
459459
) {} // <- Changed
460460

461461
increment() {
@@ -590,7 +590,7 @@ Then, make a quick adjustment to enable them in your app:
590590
import {
591591
NgReduxModule,
592592
NgRedux,
593-
DevToolsExtension
593+
DevToolsExtension,
594594
} from '@angular-redux/store'; // <- Changed
595595

596596
@NgModule({
@@ -608,7 +608,7 @@ export class AppModule {
608608
rootReducer,
609609
INITIAL_STATE,
610610
[], // <- New
611-
storeEnhancers
611+
storeEnhancers,
612612
); // <- New
613613
}
614614
}

packages/store/articles/quickstart.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface IAppState {
3232

3333
@NgModule({
3434
/* ... */
35-
imports: [, /* ... */ NgReduxModule]
35+
imports: [, /* ... */ NgReduxModule],
3636
})
3737
export class AppModule {
3838
constructor(ngRedux: NgRedux<IAppState>) {
@@ -50,7 +50,7 @@ import {
5050
Store,
5151
combineReducers,
5252
compose,
53-
createStore
53+
createStore,
5454
} from 'redux';
5555
import { NgReduxModule, NgRedux } from '@angular-redux/store';
5656
import { createLogger } from 'redux-logger';
@@ -62,12 +62,12 @@ interface IAppState {
6262

6363
export const store: Store<IAppState> = createStore(
6464
rootReducer,
65-
applyMiddleware(createLogger())
65+
applyMiddleware(createLogger()),
6666
);
6767

6868
@NgModule({
6969
/* ... */
70-
imports: [, /* ... */ NgReduxModule]
70+
imports: [, /* ... */ NgReduxModule],
7171
})
7272
class AppModule {
7373
constructor(ngRedux: NgRedux<IAppState>) {
@@ -92,7 +92,7 @@ import { select } from '@angular-redux/store';
9292

9393
@Component({
9494
template:
95-
'<button (click)="onClick()">Clicked {{ count | async }} times</button>'
95+
'<button (click)="onClick()">Clicked {{ count | async }} times</button>',
9696
})
9797
class App {
9898
@select() count$: Observable<number>;

0 commit comments

Comments
 (0)