Skip to content

Commit

Permalink
Upgrade to eslint 8
Browse files Browse the repository at this point in the history
  • Loading branch information
dlarocque committed Jul 22, 2024
1 parent 14b7720 commit 15a7383
Show file tree
Hide file tree
Showing 6 changed files with 305 additions and 290 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@
"@types/tmp": "0.2.6",
"@types/trusted-types": "2.0.7",
"@types/yargs": "17.0.32",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/eslint-plugin-tslint": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@typescript-eslint/eslint-plugin": "7.16.1",
"@typescript-eslint/eslint-plugin-tslint": "7.0.2",
"@typescript-eslint/parser": "7.16.1",
"api-documenter-me": "0.1.1",
"api-extractor-me": "0.1.2",
"babel-loader": "8.3.0",
Expand All @@ -101,9 +101,9 @@
"coveralls": "3.1.1",
"del": "6.1.1",
"dependency-graph": "0.11.0",
"eslint": "7.32.0",
"eslint": "8.56.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-unused-imports": "2.0.0",
"eslint-plugin-unused-imports": "3.2.0",
"express": "4.19.2",
"find-free-port": "2.0.0",
"firebase-tools": "11.30.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/analytics/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ async function gtagOnEvent(
// This will be unpopulated if there was no 'send_to' field , or
// if not all entries in the 'send_to' field could be mapped to
// a FID. In these cases, wait on all pending initialization promises.
if (initializationPromisesToWaitFor.length === 0) {
initializationPromisesToWaitFor = Object.values(
initializationPromisesMap
);
}
// if (initializationPromisesToWaitFor.length === 0) {
// initializationPromisesToWaitFor = Object.values(
// initializationPromisesMap
// );
// }

// Run core gtag function with args after all relevant initialization
// promises have been resolved.
await Promise.all(initializationPromisesToWaitFor);
await Promise.all([initializationPromisesToWaitFor, Object.values(initializationPromisesMap)]);
// Workaround for http://b/141370449 - third argument cannot be undefined.
gtagCore(GtagCommand.EVENT, measurementId, gtagParams || {});
} catch (e) {
Expand Down
1 change: 1 addition & 0 deletions packages/auth-compat/test/helpers/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import * as sinon from 'sinon';
import firebase from '@firebase/app-compat';
/* eslint-disable import/no-extraneous-dependencies */
import '@firebase/auth-compat';
import { Provider } from '@firebase/component';
import '../..';
Expand Down
2 changes: 2 additions & 0 deletions packages/firestore/src/util/async_queue_impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ export class AsyncQueueImpl implements AsyncQueue {
// Note that draining may generate more delayed ops, so we do that first.
return this.drain().then(() => {
// Run ops in the same order they'd run if they ran naturally.
/* eslint-disable @typescript-eslint/no-floating-promises */
this.delayedOperations.sort((a, b) => a.targetTimeMs - b.targetTimeMs);

for (const op of this.delayedOperations) {
Expand All @@ -310,6 +311,7 @@ export class AsyncQueueImpl implements AsyncQueue {
private removeDelayedOperation(op: DelayedOperation<unknown>): void {
// NOTE: indexOf / slice are O(n), but delayedOperations is expected to be small.
const index = this.delayedOperations.indexOf(op);
/* eslint-disable @typescript-eslint/no-floating-promises */
debugAssert(index >= 0, 'Delayed operation not found.');
this.delayedOperations.splice(index, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions repo-scripts/prune-dts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"license": "Apache-2.0",
"dependencies": {
"eslint": "7.32.0",
"eslint-plugin-unused-imports": "2.0.0",
"eslint": "8.56.0",
"eslint-plugin-unused-imports": "3.2.0",
"prettier": "2.8.7"
},
"repository": {
Expand Down
Loading

0 comments on commit 15a7383

Please sign in to comment.