Skip to content

Commit ae2a911

Browse files
committed
[AUTOMATED]: Prettier Code Styling
1 parent 3f08b01 commit ae2a911

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

packages-exp/auth-exp/src/core/strategies/email.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { createAuthUri, CreateAuthUriRequest } from '../../api/authentication/create_auth_uri';
18+
import {
19+
createAuthUri,
20+
CreateAuthUriRequest
21+
} from '../../api/authentication/create_auth_uri';
1922
import * as api from '../../api/authentication/email_and_password';
2023
import { Operation } from '../../model/action_code_info';
21-
import { ActionCodeSettings, setActionCodeSettingsOnRequest } from '../../model/action_code_settings';
24+
import {
25+
ActionCodeSettings,
26+
setActionCodeSettingsOnRequest
27+
} from '../../model/action_code_settings';
2228
import { Auth } from '../../model/auth';
2329
import { User } from '../../model/user';
2430
import { getCurrentUrl, isHttpOrHttps } from '../util/location';

packages-exp/auth-exp/src/core/user/user_impl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { IdTokenResult } from '../../model/id_token';
2020
import { User } from '../../model/user';
2121
import { PersistedBlob } from '../persistence';
2222
import { ProviderId } from '../providers';
23-
import { assert, assertStringOrUndefined} from '../util/assert';
23+
import { assert, assertStringOrUndefined } from '../util/assert';
2424
import { StsTokenManager } from './token_manager';
2525

2626
export interface UserParameters {

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

+19-13
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,34 @@ import { logError } from './log';
2121

2222
/**
2323
* Unconditionally fails, throwing a developer facing INTERNAL_ERROR
24-
*
24+
*
2525
* @param appName App name for tagging the error
2626
* @throws FirebaseError
2727
*/
28-
export function fail(
29-
appName: string
30-
): never {
28+
export function fail(appName: string): never {
3129
throw AUTH_ERROR_FACTORY.create(AuthErrorCode.INTERNAL_ERROR, { appName });
3230
}
3331

3432
/**
3533
* Verifies the given condition and fails if false, throwing a developer facing error
36-
*
34+
*
3735
* @param assertion
38-
* @param appName
36+
* @param appName
3937
*/
4038
export function assert(assertion: boolean, appName: string): asserts assertion {
4139
if (!assertion) {
4240
fail(appName);
4341
}
4442
}
4543

46-
export function assertStringOrUndefined(assertion: unknown, appName: string): asserts assertion is string | undefined {
47-
assert(typeof assertion === 'string' || typeof assertion === 'undefined', appName);
44+
export function assertStringOrUndefined(
45+
assertion: unknown,
46+
appName: string
47+
): asserts assertion is string | undefined {
48+
assert(
49+
typeof assertion === 'string' || typeof assertion === 'undefined',
50+
appName
51+
);
4852
}
4953

5054
/**
@@ -56,8 +60,7 @@ export function assertStringOrUndefined(assertion: unknown, appName: string): as
5660
export function debugFail(failure: string): never {
5761
// Log the failure in addition to throw an exception, just in case the
5862
// exception is swallowed.
59-
const message =
60-
`AUTH (${SDK_VERSION}) INTERNAL ASSERTION FAILED: ` + failure;
63+
const message = `AUTH (${SDK_VERSION}) INTERNAL ASSERTION FAILED: ` + failure;
6164
logError(message);
6265

6366
// NOTE: We don't use FirestoreError here because these are internal failures
@@ -69,12 +72,15 @@ export function debugFail(failure: string): never {
6972
/**
7073
* Fails if the given assertion condition is false, throwing an Error with the
7174
* given message if it did.
72-
*
75+
*
7376
* @param assertion
7477
* @param message
7578
*/
76-
export function debugAssert(assertion: boolean, message: string): asserts assertion {
79+
export function debugAssert(
80+
assertion: boolean,
81+
message: string
82+
): asserts assertion {
7783
if (!assertion) {
7884
debugFail(message);
7985
}
80-
}
86+
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ export function logError(msg: string, ...args: string[]): void {
4141
if (logClient.logLevel <= LogLevel.ERROR) {
4242
logClient.error(`Auth (${SDK_VERSION}): ${msg}`, ...args);
4343
}
44-
}
44+
}

0 commit comments

Comments
 (0)