Skip to content

Commit 59d1572

Browse files
Just Use Prettier™
1 parent 1bae466 commit 59d1572

File tree

8 files changed

+40
-40
lines changed

8 files changed

+40
-40
lines changed

.prettierrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"singleQuote": true,
3-
"trailingComma": "all",
3+
"trailingComma": "es5",
44
"printWidth": 120
55
}

src/components/UIRouter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ router.plugin(pushStateLocationPlugin);
6262

6363
/** @hidden */
6464
export const UIRouterInstanceUndefinedError = new Error(
65-
`UIRouter instance is undefined. Did you forget to include the <UIRouter> as root component?`,
65+
`UIRouter instance is undefined. Did you forget to include the <UIRouter> as root component?`
6666
);
6767

6868
export class UIRouter extends Component<UIRouterProps, UIRouterState> {

src/components/UISrefActive.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const StateNameMustBeAStringError = new Error('State name provided to <UI
3333

3434
/** @internalapi */
3535
export const { Provider: UISrefActiveProvider, Consumer: UISrefActiveConsumer } = React.createContext<Function>(
36-
undefined,
36+
undefined
3737
);
3838

3939
class SrefActive extends Component<UISrefActiveProps, any> {
@@ -131,7 +131,7 @@ class SrefActive extends Component<UISrefActiveProps, any> {
131131
this.props.children,
132132
Object.assign({}, this.props.children.props, {
133133
className: classNames(this.props.children.props.className, activeClasses),
134-
}),
134+
})
135135
)
136136
: this.props.children;
137137
return <UISrefActiveProvider value={this.addStateInfo}>{children}</UISrefActiveProvider>;

src/components/UIView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export interface UIViewResolves {
7575
*/
7676
export type RenderPropCallback = (
7777
Component: StatelessComponent<any> | ComponentClass<any> | ClassicComponentClass<any>,
78-
Props: any,
78+
Props: any
7979
) => JSX.Element | null;
8080

8181
export interface UIViewInjectedProps {
@@ -105,7 +105,7 @@ export interface UIViewState {
105105

106106
export const TransitionPropCollisionError = new Error(
107107
'`transition` cannot be used as resolve token. ' +
108-
'Please rename your resolve to avoid conflicts with the router transition.',
108+
'Please rename your resolve to avoid conflicts with the router transition.'
109109
);
110110

111111
/** @internalapi */

src/components/__tests__/UIRouter.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('<UIRouter>', () => {
2121
const wrapper = mount(
2222
<UIRouter>
2323
<Child />
24-
</UIRouter>,
24+
</UIRouter>
2525
);
2626
}).toThrow();
2727
});
@@ -30,7 +30,7 @@ describe('<UIRouter>', () => {
3030
const wrapper = mount(
3131
<UIRouter plugins={[memoryLocationPlugin]} states={[]}>
3232
<UIRouterConsumer>{router => <Child router={router} />}</UIRouterConsumer>
33-
</UIRouter>,
33+
</UIRouter>
3434
);
3535
expect(wrapper.find(Child).props().router).toBeDefined();
3636
});
@@ -41,7 +41,7 @@ describe('<UIRouter>', () => {
4141
const wrapper = mount(
4242
<UIRouter router={router}>
4343
<UIRouterConsumer>{router => <Child router={router} />}</UIRouterConsumer>
44-
</UIRouter>,
44+
</UIRouter>
4545
);
4646
expect(wrapper.find(Child).props().router).toBe(router);
4747
});
@@ -56,7 +56,7 @@ describe('<UIRouter>', () => {
5656
return null;
5757
}}
5858
</UIRouterConsumer>
59-
</UIRouter>,
59+
</UIRouter>
6060
);
6161
});
6262

@@ -71,7 +71,7 @@ describe('<UIRouter>', () => {
7171
return null;
7272
}}
7373
</UIRouterConsumer>
74-
</UIRouter>,
74+
</UIRouter>
7575
);
7676
});
7777
});

src/components/__tests__/UISref.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('<UISref>', () => {
3535
const wrapper = mount(
3636
<UIRouter router={router}>
3737
<UIView />
38-
</UIRouter>,
38+
</UIRouter>
3939
);
4040
await router.stateService.go('state');
4141
wrapper.update();
@@ -48,7 +48,7 @@ describe('<UISref>', () => {
4848
const wrapper = mount(
4949
<UIRouter router={router}>
5050
<UIView />
51-
</UIRouter>,
51+
</UIRouter>
5252
);
5353
await router.stateService.go('state');
5454
wrapper.update();
@@ -70,7 +70,7 @@ describe('<UISref>', () => {
7070
const wrapper = mount(
7171
<UIRouter router={router}>
7272
<UIView />
73-
</UIRouter>,
73+
</UIRouter>
7474
);
7575
await router.stateService.go('state');
7676
wrapper.update();
@@ -87,7 +87,7 @@ describe('<UISref>', () => {
8787
const wrapper = mount(
8888
<UIRouter router={router}>
8989
<UIView />
90-
</UIRouter>,
90+
</UIRouter>
9191
);
9292
await router.stateService.go('state');
9393
wrapper.update();
@@ -106,7 +106,7 @@ describe('<UISref>', () => {
106106
<UISref to="state">
107107
<a>link</a>
108108
</UISref>
109-
</UIRouter>,
109+
</UIRouter>
110110
);
111111
const uiSref = wrapper
112112
.find(UISref)

src/components/__tests__/UISrefActive.test.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe('<UISrefActive>', () => {
105105
const wrapper = mount(
106106
<UIRouter router={router}>
107107
<UIView />
108-
</UIRouter>,
108+
</UIRouter>
109109
);
110110
await router.stateService.go('simple');
111111
wrapper.update();
@@ -118,7 +118,7 @@ describe('<UISrefActive>', () => {
118118
const wrapper = mount(
119119
<UIRouter router={router}>
120120
<UIView />
121-
</UIRouter>,
121+
</UIRouter>
122122
);
123123
await router.stateService.go('parent.child1');
124124
wrapper.update();
@@ -138,7 +138,7 @@ describe('<UISrefActive>', () => {
138138
const wrapper = mount(
139139
<UIRouter router={router}>
140140
<UIView />
141-
</UIRouter>,
141+
</UIRouter>
142142
);
143143
}).toThrow(StateNameMustBeAStringError);
144144
});
@@ -147,7 +147,7 @@ describe('<UISrefActive>', () => {
147147
const wrapper = mount(
148148
<UIRouter router={router}>
149149
<UIView />
150-
</UIRouter>,
150+
</UIRouter>
151151
);
152152
let spy, node;
153153
await router.stateService.go('simple');
@@ -174,7 +174,7 @@ describe('<UISrefActive>', () => {
174174
</UISrefActive>
175175
<UIView />
176176
</div>
177-
</UIRouter>,
177+
</UIRouter>
178178
);
179179
await router.stateService.go('withParams', { param: 5 });
180180
wrapper.update();
@@ -194,7 +194,7 @@ describe('<UISrefActive>', () => {
194194
<a>child1</a>
195195
</UISref>
196196
</UISrefActive>
197-
</UIRouter>,
197+
</UIRouter>
198198
);
199199
let node = wrapper.find(UISrefActive).at(0);
200200
const instance = wrapper
@@ -223,7 +223,7 @@ describe('<UISrefActive>', () => {
223223
</UISref>
224224
</div>
225225
</UISrefActive>
226-
</UIRouter>,
226+
</UIRouter>
227227
);
228228
const instance = wrapper
229229
.find(UISrefActive)
@@ -277,7 +277,7 @@ describe('<UISrefActive>', () => {
277277
</UISrefActive>
278278
<UIView />
279279
</div>
280-
</UIRouter>,
280+
</UIRouter>
281281
);
282282
router.stateRegistry.register({
283283
name: '_parent',

src/components/__tests__/UIView.test.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('<UIView>', () => {
6767
const wrapper = mount(
6868
<UIRouter router={router}>
6969
<UIView />
70-
</UIRouter>,
70+
</UIRouter>
7171
);
7272
expect(wrapper.html()).toBe('<div></div>');
7373
});
@@ -79,8 +79,8 @@ describe('<UIView>', () => {
7979
<UIView>
8080
<span />
8181
</UIView>
82-
</UIRouter>,
83-
).contains(<span />),
82+
</UIRouter>
83+
).contains(<span />)
8484
).toBe(true);
8585
});
8686

@@ -91,8 +91,8 @@ describe('<UIView>', () => {
9191
<UIView className="myClass" style={{ margin: 5 }}>
9292
<span />
9393
</UIView>
94-
</UIRouter>,
95-
).contains(<span className="myClass" style={{ margin: 5 }} />),
94+
</UIRouter>
95+
).contains(<span className="myClass" style={{ margin: 5 }} />)
9696
).toBe(true);
9797
});
9898
});
@@ -110,7 +110,7 @@ describe('<UIView>', () => {
110110
const wrapper = mount(
111111
<UIRouter router={router}>
112112
<UIView />
113-
</UIRouter>,
113+
</UIRouter>
114114
);
115115
return router.stateService.go('parent').then(() => {
116116
expect(wrapper.html()).toEqual(`<div><span>parent</span><div></div></div>`);
@@ -127,7 +127,7 @@ describe('<UIView>', () => {
127127
const wrapper = mount(
128128
<UIRouter router={router}>
129129
<UIView />
130-
</UIRouter>,
130+
</UIRouter>
131131
);
132132
await router.stateService.go('__state');
133133
wrapper.update();
@@ -145,7 +145,7 @@ describe('<UIView>', () => {
145145
const wrapper = mount(
146146
<UIRouter router={router}>
147147
<UIView />
148-
</UIRouter>,
148+
</UIRouter>
149149
);
150150
await router.stateService.go('__state');
151151
wrapper.update();
@@ -166,7 +166,7 @@ describe('<UIView>', () => {
166166
const wrapper = mount(
167167
<UIRouter router={router}>
168168
<UIView />
169-
</UIRouter>,
169+
</UIRouter>
170170
);
171171
}).toThrow(TransitionPropCollisionError);
172172
});
@@ -176,7 +176,7 @@ describe('<UIView>', () => {
176176
const wrapper = mount(
177177
<UIRouter router={router}>
178178
<UIView />
179-
</UIRouter>,
179+
</UIRouter>
180180
);
181181
expect(wrapper.html()).toEqual(`<div><span>parent</span><span>child</span></div>`);
182182
});
@@ -186,7 +186,7 @@ describe('<UIView>', () => {
186186
const wrapper = mount(
187187
<UIRouter router={router}>
188188
<UIView />
189-
</UIRouter>,
189+
</UIRouter>
190190
);
191191
expect(wrapper.html()).toEqual(`<div><span>namedParent</span><div></div><div></div></div>`);
192192
});
@@ -196,7 +196,7 @@ describe('<UIView>', () => {
196196
const wrapper = mount(
197197
<UIRouter router={router}>
198198
<UIView />
199-
</UIRouter>,
199+
</UIRouter>
200200
);
201201
expect(wrapper.html()).toEqual(`<div><span>namedParent</span><span>child1</span><span>child2</span></div>`);
202202
});
@@ -205,7 +205,7 @@ describe('<UIView>', () => {
205205
const wrapper = mount(
206206
<UIRouter router={router}>
207207
<UIView />
208-
</UIRouter>,
208+
</UIRouter>
209209
);
210210
await router.stateService.go('parent.child');
211211
expect(wrapper.html()).toEqual(`<div><span>parent</span><span>child</span></div>`);
@@ -236,7 +236,7 @@ describe('<UIView>', () => {
236236
const wrapper = mount(
237237
<UIRouter router={router}>
238238
<UIView />
239-
</UIRouter>,
239+
</UIRouter>
240240
);
241241
await router.stateService.go('__state');
242242
expect(wrapper.html()).toEqual('<span>UiCanExitHookComponent</span>');
@@ -263,7 +263,7 @@ describe('<UIView>', () => {
263263
const wrapper = mount(
264264
<UIRouter router={router}>
265265
<UIView render={(Comp, props) => <Comp {...props} foo={<span>bar</span>} />} />
266-
</UIRouter>,
266+
</UIRouter>
267267
);
268268
await router.stateService.go('withrenderprop');
269269
expect(wrapper.html()).toEqual(`<div><span>withrenderprop</span><span>bar</span></div>`);
@@ -291,7 +291,7 @@ describe('<UIView>', () => {
291291
const wrapper = mount(
292292
<UIRouter router={router}>
293293
<UIView />
294-
</UIRouter>,
294+
</UIRouter>
295295
);
296296
await router.stateService.go('testunmount');
297297
await router.stateService.reload('testunmount');

0 commit comments

Comments
 (0)