Skip to content

Commit eaf7d11

Browse files
committed
Formatting
1 parent ac30e8f commit eaf7d11

File tree

4 files changed

+30
-21
lines changed

4 files changed

+30
-21
lines changed

packages-exp/auth-exp/src/core/providers/oauth.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export class OAuthProvider implements externs.AuthProvider {
4040
): externs.OAuthCredential | null {
4141
debugFail('not implemented');
4242
}
43-
static credentialFromError(_error: AuthErrorCode): externs.OAuthCredential | null {
43+
static credentialFromError(
44+
_error: AuthErrorCode
45+
): externs.OAuthCredential | null {
4446
debugFail('not implemented');
4547
}
4648
static credentialFromJSON(_json: object): externs.OAuthCredential {
@@ -55,7 +57,9 @@ export class OAuthProvider implements externs.AuthProvider {
5557
this.defaultLanguageCode = languageCode;
5658
}
5759

58-
setCustomParameters(customOAuthParameters: CustomParameters): externs.AuthProvider {
60+
setCustomParameters(
61+
customOAuthParameters: CustomParameters
62+
): externs.AuthProvider {
5963
this.customParameters = customOAuthParameters;
6064
return this;
6165
}

packages-exp/auth-exp/src/core/util/event_id.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/**
32
* @license
43
* Copyright 2020 Google LLC

packages-exp/auth-exp/src/core/util/popup.test.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ describe('src/core/util/popup', () => {
4747

4848
beforeEach(() => {
4949
windowOpenStub = sinon.stub(window, 'open');
50-
popupStub = sinon.stub({
50+
popupStub = sinon.stub(({
5151
focus: () => {},
52-
close: () => {},
53-
} as unknown as Window);
52+
close: () => {}
53+
} as unknown) as Window);
5454
windowOpenStub.returns(popupStub);
5555
});
5656

@@ -103,24 +103,30 @@ describe('src/core/util/popup', () => {
103103
it('errors if the popup is blocked', () => {
104104
setUA('');
105105
windowOpenStub.returns(undefined);
106-
expect(() => _open('appName')).to.throw(FirebaseError, 'auth/popup-blocked');
106+
expect(() => _open('appName')).to.throw(
107+
FirebaseError,
108+
'auth/popup-blocked'
109+
);
107110
});
108111

109112
it('builds the proper options string', () => {
110113
const screen = window.screen;
111114
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
112115
(window as any).sreen = {
113116
availHeight: 1000,
114-
availWidth: 2000,
117+
availWidth: 2000
115118
};
116119

117120
setUA('');
118121
_open('appName');
119-
const options = windowOptions().split(',').filter(s => !!s).map(prop => prop.split('='))
120-
.reduce<Record<string, string>>((accum, [prop, val]) => {
121-
accum[prop] = val;
122-
return accum;
123-
}, {});
122+
const options = windowOptions()
123+
.split(',')
124+
.filter(s => !!s)
125+
.map(prop => prop.split('='))
126+
.reduce<Record<string, string>>((accum, [prop, val]) => {
127+
accum[prop] = val;
128+
return accum;
129+
}, {});
124130

125131
expect(options).to.eql({
126132
location: 'yes',
@@ -130,7 +136,7 @@ describe('src/core/util/popup', () => {
130136
width: '500',
131137
height: '600',
132138
top: '0',
133-
left: '0',
139+
left: '0'
134140
});
135141

136142
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
@@ -170,4 +176,4 @@ describe('src/core/util/popup', () => {
170176
expect(() => authPopup.close()).not.to.throw(Error);
171177
});
172178
});
173-
});
179+
});

packages-exp/auth-exp/src/core/util/popup.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class AuthPopup {
4848

4949
/** Wrapper so that we can stub the UA in tests */
5050
export const _uaGetter = {
51-
getUA,
51+
getUA
5252
};
5353

5454
export function _open(
@@ -58,10 +58,7 @@ export function _open(
5858
width = DEFAULT_WIDTH,
5959
height = DEFAULT_HEIGHT
6060
): AuthPopup {
61-
const top = Math.min(
62-
(window.screen.availHeight - height) / 2,
63-
0
64-
).toString();
61+
const top = Math.min((window.screen.availHeight - height) / 2, 0).toString();
6562
const left = Math.min((window.screen.availWidth - width) / 2, 0).toString();
6663
let target = '';
6764

@@ -89,7 +86,10 @@ export function _open(
8986
options.scrollbars = 'yes';
9087
}
9188

92-
const optionsString = Object.entries(options).reduce((accum, [key, value]) => `${accum}${key}=${value},`, '');
89+
const optionsString = Object.entries(options).reduce(
90+
(accum, [key, value]) => `${accum}${key}=${value},`,
91+
''
92+
);
9393

9494
// TODO: Plain-old window.open isn't going to work for iOS, need to fix this
9595
// (see goog.window.open)

0 commit comments

Comments
 (0)