Skip to content

Commit f46b60f

Browse files
committed
Fix some lint errors
1 parent 3bf4ce6 commit f46b60f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

packages/auth/src/platform_browser/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ const mintCookieFactory = (url: string) => async (user: User | null) => {
4343
const idTokenAge =
4444
idTokenResult &&
4545
(new Date().getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1_000;
46-
if (idTokenAge && idTokenAge > authIdTokenMaxAge) return;
46+
if (idTokenAge && idTokenAge > authIdTokenMaxAge) { return; }
4747
// Specifically trip null => undefined when logged out, to delete any existing cookie
4848
const idToken = idTokenResult?.token;
49-
if (lastPostedIdToken === idToken) return;
49+
if (lastPostedIdToken === idToken) { return; }
5050
lastPostedIdToken = idToken;
5151
await fetch(url, {
5252
method: idToken ? 'POST' : 'DELETE',
5353
headers: idToken
5454
? {
55-
'Authorization': `Bearer ${idToken}`
56-
}
55+
'Authorization': `Bearer ${idToken}`
56+
}
5757
: {}
5858
});
5959
};
@@ -86,7 +86,7 @@ export function getAuth(app: FirebaseApp = getApp()): Auth {
8686
if (authTokenSyncUrl) {
8787
const mintCookie = mintCookieFactory(authTokenSyncUrl);
8888
beforeAuthStateChanged(auth, mintCookie, () => {
89-
mintCookie(auth.currentUser);
89+
void mintCookie(auth.currentUser);
9090
});
9191
onIdTokenChanged(auth, user => mintCookie(user));
9292
}

packages/util/src/defaults.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ const getDefaultsFromEnvVariable = (): FirebaseDefaults | undefined => {
4848
const jsonPath = process.env.__FIREBASE_DEFAULTS_PATH__;
4949
if (jsonPath && typeof require !== 'undefined') {
5050
try {
51+
// eslint-disable-next-line @typescript-eslint/no-require-imports
5152
const json = require(jsonPath);
5253
return json;
5354
} catch (e) {
54-
`Unable to read defaults from file: ${jsonPath}.`;
55+
console.warn(`Unable to read defaults from file: ${jsonPath}.`);
5556
}
5657
}
5758
};

0 commit comments

Comments
 (0)