Skip to content

Run prettier/license on whole repo #5604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion integration/firestore/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ function copyTests() {
*/
/import\s+\* as firebaseExport\s+from\s+('|")[^\1]+firebase_export\1;?/,
`import * as firebaseExport from '${resolve(
__dirname, './firebase_export'
__dirname,
'./firebase_export'
)}';

if (typeof process === 'undefined') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ module.exports = async webdriver => {
const db = dbOpenReq.result;
const tx = db.transaction(BACKGROUND_MESSAGES_OBJECT_STORE, 'readonly');

tx
.objectStore(BACKGROUND_MESSAGES_OBJECT_STORE)
.getAll().onsuccess = e => {
window.backgroundMessages = e.target.result;
};
tx.objectStore(BACKGROUND_MESSAGES_OBJECT_STORE).getAll().onsuccess =
e => {
window.backgroundMessages = e.target.result;
};
};
});

Expand Down
4 changes: 3 additions & 1 deletion packages/analytics-compat/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import typescriptPlugin from 'rollup-plugin-typescript2';
import typescript from 'typescript';
import pkg from './package.json';

const deps = Object.keys(Object.assign({}, pkg.peerDependencies, pkg.dependencies));
const deps = Object.keys(
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
);
/**
* ES5 Builds
*/
Expand Down
4 changes: 1 addition & 3 deletions packages/analytics-compat/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ const factory: InstanceFactory<'analytics-compat'> = (
) => {
// Dependencies
const app = container.getProvider('app-compat').getImmediate();
const analyticsServiceExp = container
.getProvider('analytics')
.getImmediate();
const analyticsServiceExp = container.getProvider('analytics').getImmediate();

return new AnalyticsService(app as FirebaseApp, analyticsServiceExp);
};
Expand Down
13 changes: 4 additions & 9 deletions packages/analytics/src/get-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ describe('Dynamic Config Fetch Functions', () => {
it('successfully request and receives dynamic config JSON data', async () => {
stubFetch(200, successObject);
const app = getFakeApp(fakeAppParams);
const config:
| DynamicConfig
| MinimalDynamicConfig = await fetchDynamicConfigWithRetry(app);
const config: DynamicConfig | MinimalDynamicConfig =
await fetchDynamicConfigWithRetry(app);
expect(fetchStub.args[0][0]).to.equal(fakeUrl);
expect(fetchStub.args[0][1].headers.get('x-goog-api-key')).to.equal(
fakeAppParams.apiKey
Expand Down Expand Up @@ -152,12 +151,8 @@ describe('Dynamic Config Fetch Functions', () => {
fetchStub.onCall(retriableStatuses.length).resolves(successResponse);

const app = getFakeApp(fakeAppParams);
const config:
| DynamicConfig
| MinimalDynamicConfig = await fetchDynamicConfigWithRetry(
app,
fakeRetryData
);
const config: DynamicConfig | MinimalDynamicConfig =
await fetchDynamicConfigWithRetry(app, fakeRetryData);

// Verify retryData.setThrottleMetadata() was called on each retry.
for (let i = 0; i < retriableStatuses.length; i++) {
Expand Down
6 changes: 1 addition & 5 deletions packages/analytics/testing/get-fake-firebase-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
* limitations under the License.
*/

import {
FirebaseApp,
initializeApp,
_registerComponent
} from '@firebase/app';
import { FirebaseApp, initializeApp, _registerComponent } from '@firebase/app';
import { Component, ComponentType } from '@firebase/component';
import { _FirebaseInstallationsInternal } from '@firebase/installations';
import { AnalyticsService } from '../src/factory';
Expand Down
4 changes: 3 additions & 1 deletion packages/app-check-compat/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import typescriptPlugin from 'rollup-plugin-typescript2';
import typescript from 'typescript';
import pkg from './package.json';

const deps = Object.keys(Object.assign({}, pkg.peerDependencies, pkg.dependencies));
const deps = Object.keys(
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
);
/**
* ES5 Builds
*/
Expand Down
4 changes: 3 additions & 1 deletion packages/app-check/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import typescriptPlugin from 'rollup-plugin-typescript2';
import typescript from 'typescript';
import pkg from './package.json';

const deps = Object.keys(Object.assign({}, pkg.peerDependencies, pkg.dependencies));
const deps = Object.keys(
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
);
/**
* ES5 Builds
*/
Expand Down
6 changes: 1 addition & 5 deletions packages/app-check/test/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
* limitations under the License.
*/

import {
FirebaseApp,
initializeApp,
_registerComponent
} from '@firebase/app';
import { FirebaseApp, initializeApp, _registerComponent } from '@firebase/app';
import { GreCAPTCHA, RECAPTCHA_URL } from '../src/recaptcha';
import {
Provider,
Expand Down
6 changes: 3 additions & 3 deletions packages/app-compat/src/firebaseApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface _FirebaseApp {
/**
* Global context object for a collection of services using
* a shared authentication state.
*
*
* marked as internal because it references internal types exported from @firebase/app
* @internal
*/
Expand Down Expand Up @@ -135,9 +135,9 @@ export class FirebaseAppImpl implements Compat<_FirebaseAppExp>, _FirebaseApp {
}

// getImmediate will always succeed because _getService is only called for registered components.
return (provider.getImmediate({
return provider.getImmediate({
identifier: instanceIdentifier
}) as unknown) as _FirebaseService;
}) as unknown as _FirebaseService;
}

/**
Expand Down
7 changes: 4 additions & 3 deletions packages/app-compat/src/lite/firebaseAppLite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import { Compat } from '@firebase/util';
* a shared authentication state.
*/
export class FirebaseAppLiteImpl
implements FirebaseApp, Compat<FirebaseAppExp> {
implements FirebaseApp, Compat<FirebaseAppExp>
{
constructor(
readonly _delegate: FirebaseAppExp,
private readonly firebase: _FirebaseNamespace
Expand Down Expand Up @@ -85,8 +86,8 @@ export class FirebaseAppLiteImpl
this._delegate.checkDestroyed();

// getImmediate will always succeed because _getService is only called for registered components.
return (this._delegate.container.getProvider(name as Name).getImmediate({
return this._delegate.container.getProvider(name as Name).getImmediate({
identifier: instanceIdentifier
}) as unknown) as _FirebaseService;
}) as unknown as _FirebaseService;
}
}
2 changes: 1 addition & 1 deletion packages/app-compat/src/public-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface FirebaseOptions {
export interface FirebaseAppConfig {
name?: string;
automaticDataCollectionEnabled?: boolean;
}
}

interface FirebaseAppContructor {
new (): FirebaseApp;
Expand Down
4 changes: 3 additions & 1 deletion packages/app/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import typescript from 'typescript';
import json from '@rollup/plugin-json';
import pkg from './package.json';

const deps = Object.keys(Object.assign({}, pkg.peerDependencies, pkg.dependencies));
const deps = Object.keys(
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
);

/**
* ES5 Builds
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/firebaseApp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('FirebaseAppNext', () => {
);

expect(() => app.name).to.not.throw();
((app as unknown) as FirebaseAppImpl).isDeleted = true;
(app as unknown as FirebaseAppImpl).isDeleted = true;

expect(() => {
app.name;
Expand Down
3 changes: 1 addition & 2 deletions packages/app/test/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export function createTestComponent(
const component = new Component(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
name as any,
container =>
new TestService(container.getProvider('app').getImmediate()),
container => new TestService(container.getProvider('app').getImmediate()),
type
);
component.setMultipleInstances(multiInstances);
Expand Down
5 changes: 2 additions & 3 deletions packages/auth-compat/demo/public/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,8 @@ function onFinalizeEnrollWithPhoneMultiFactor() {
verificationId,
verificationCode
);
var multiFactorAssertion = firebase.auth.PhoneMultiFactorGenerator.assertion(
credential
);
var multiFactorAssertion =
firebase.auth.PhoneMultiFactorGenerator.assertion(credential);
var displayName = $('#enroll-mfa-phone-display-name').val() || undefined;

activeUser()
Expand Down
6 changes: 3 additions & 3 deletions packages/auth-compat/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import * as fetchImpl from 'node-fetch';
import './index';

FetchProvider.initialize(
(fetchImpl.default as unknown) as typeof fetch,
(fetchImpl.Headers as unknown) as typeof Headers,
(fetchImpl.Response as unknown) as typeof Response
fetchImpl.default as unknown as typeof fetch,
fetchImpl.Headers as unknown as typeof Headers,
fetchImpl.Response as unknown as typeof Response
);
Loading