Skip to content

Commit 55f09a2

Browse files
renovate[bot]renovate-botFeiyang1
authored
Update dependency prettier to v2 (#3386)
* Update dependency prettier to v2 * update configuration * add parenthese * run prettier Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Feiyang1 <[email protected]>
1 parent 340d715 commit 55f09a2

File tree

109 files changed

+729
-966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+729
-966
lines changed

.prettierrc

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
singleQuote: true,
33
printWidth: 80,
4-
quoteProps: preserve
5-
}
4+
quoteProps: preserve,
5+
trailingComma: none,
6+
arrowParens: avoid
7+
}

config/karma.saucelabs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function appiumLauncher(
153153
};
154154
}
155155

156-
module.exports = function(config) {
156+
module.exports = function (config) {
157157
const { packageName, files: testFiles } = getTestFiles();
158158
const sauceLabsBrowsers = getSauceLabsBrowsers(packageName);
159159

integration/browserify/karma.conf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ const karmaBase = require('../../config/karma.base');
2121

2222
const files = [`dist/**/*`];
2323

24-
module.exports = function(config) {
24+
module.exports = function (config) {
2525
const karmaConfig = Object.assign({}, karmaBase, {
2626
// files to load into karma
2727
files: files,

integration/browserify/src/namespace.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -29,6 +29,6 @@ firebase.initializeApp({
2929
appId: 'myAppId'
3030
});
3131

32-
describe('Firebase Namespace Validation', function() {
32+
describe('Firebase Namespace Validation', function () {
3333
validateNamespace(namespaceDefinition, firebase);
3434
});

integration/firestore/karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const karmaBase = require('../../config/karma.base');
2121

2222
const files = ['./dist/test-harness.js'];
2323

24-
module.exports = function(config) {
24+
module.exports = function (config) {
2525
const karmaConfig = Object.assign({}, karmaBase, {
2626
// files to load into karma
2727
files: files,

integration/messaging/test/test-deleteToken.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ const createPermittedWebDriver = require('./utils/createPermittedWebDriver');
2626
const TEST_SUITE_TIMEOUT_MS = 100000;
2727
const TEST_DOMAIN = 'valid-vapid-key';
2828

29-
describe('Firebase Messaging Integration Tests > get and delete token', function() {
29+
describe('Firebase Messaging Integration Tests > get and delete token', function () {
3030
this.timeout(TEST_SUITE_TIMEOUT_MS);
3131
this.retries(3);
3232
let globalWebDriver;
3333

34-
before(async function() {
34+
before(async function () {
3535
await testServer.start();
3636
});
3737

38-
after(async function() {
38+
after(async function () {
3939
await testServer.stop();
4040
});
4141

@@ -46,8 +46,8 @@ describe('Firebase Messaging Integration Tests > get and delete token', function
4646
return;
4747
}
4848

49-
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function() {
50-
before(async function() {
49+
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function () {
50+
before(async function () {
5151
// Use one webDriver per browser instead of one per test to speed up test.
5252
globalWebDriver = createPermittedWebDriver(
5353
/* browser= */ assistantBrowser.getId()
@@ -58,15 +58,15 @@ describe('Firebase Messaging Integration Tests > get and delete token', function
5858
);
5959
});
6060

61-
after(async function() {
61+
after(async function () {
6262
await seleniumAssistant.killWebDriver(globalWebDriver);
6363
});
6464

65-
afterEach(async function() {
65+
afterEach(async function () {
6666
await clearAppForTest(globalWebDriver);
6767
});
6868

69-
it(`Test app can delete a valid token`, async function() {
69+
it(`Test app can delete a valid token`, async function () {
7070
const token = await retrieveToken(globalWebDriver);
7171
expect(token).to.exist;
7272
try {

integration/messaging/test/test-send.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ const WAIT_TIME_BEFORE_RETRIEVING_BACKGROUND_MESSAGES_MILLISECONDS = 60000;
4343

4444
const wait = ms => new Promise(res => setTimeout(res, ms));
4545

46-
describe('Starting Integration Test > Sending and Receiving ', function() {
46+
describe('Starting Integration Test > Sending and Receiving ', function () {
4747
this.retries(3);
4848
let globalWebDriver;
4949

50-
before(async function() {
50+
before(async function () {
5151
await testServer.start();
5252
});
5353

54-
after(async function() {
54+
after(async function () {
5555
await testServer.stop();
5656
});
5757

@@ -61,14 +61,14 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
6161
return;
6262
}
6363

64-
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function() {
65-
before(async function() {
64+
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function () {
65+
before(async function () {
6666
globalWebDriver = createPermittedWebDriver(
6767
/* browser= */ assistantBrowser.getId()
6868
);
6969
});
7070

71-
it('Background app can receive a {} empty message from sw', async function() {
71+
it('Background app can receive a {} empty message from sw', async function () {
7272
this.timeout(TIMEOUT_BACKGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
7373

7474
// Clearing the cache and db data by killing the previously instantiated driver. Note that ideally this call is placed inside the after/before hooks. However, Mocha forbids operations longer than 2s in hooks. Hence, this clearing call needs to be inside the test unit.
@@ -97,7 +97,7 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
9797
);
9898
});
9999

100-
it('Background app can receive a {"data"} message frow sw', async function() {
100+
it('Background app can receive a {"data"} message frow sw', async function () {
101101
this.timeout(TIMEOUT_BACKGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
102102

103103
await seleniumAssistant.killWebDriver(globalWebDriver);
@@ -126,7 +126,7 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
126126
);
127127
});
128128

129-
it('Foreground app can receive a {} empty message in onMessage', async function() {
129+
it('Foreground app can receive a {} empty message in onMessage', async function () {
130130
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
131131

132132
await seleniumAssistant.killWebDriver(globalWebDriver);
@@ -153,7 +153,7 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
153153
);
154154
});
155155

156-
it('Foreground app can receive a {"notification"} message in onMessage', async function() {
156+
it('Foreground app can receive a {"notification"} message in onMessage', async function () {
157157
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
158158

159159
await seleniumAssistant.killWebDriver(globalWebDriver);
@@ -180,7 +180,7 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
180180
);
181181
});
182182

183-
it('Foreground app can receive a {"data"} message in onMessage', async function() {
183+
it('Foreground app can receive a {"data"} message in onMessage', async function () {
184184
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
185185

186186
await seleniumAssistant.killWebDriver(globalWebDriver);
@@ -207,7 +207,7 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
207207
);
208208
});
209209

210-
it('Foreground app can receive a {"notification", "data"} message in onMessage', async function() {
210+
it('Foreground app can receive a {"notification", "data"} message in onMessage', async function () {
211211
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
212212

213213
await seleniumAssistant.killWebDriver(globalWebDriver);

integration/messaging/test/test-updateToken.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ const getErrors = require('./utils/getErrors');
2828
const TEST_SUITE_TIMEOUT_MS = 70000;
2929
const TEST_DOMAIN = 'valid-vapid-key';
3030

31-
describe('Firebase Messaging Integration Tests > update a token', function() {
31+
describe('Firebase Messaging Integration Tests > update a token', function () {
3232
this.timeout(TEST_SUITE_TIMEOUT_MS);
3333
this.retries(3);
3434

3535
let globalWebDriver;
3636

37-
before(async function() {
37+
before(async function () {
3838
await testServer.start();
3939
});
4040

41-
after(async function() {
41+
after(async function () {
4242
await testServer.stop();
4343
});
4444

@@ -49,8 +49,8 @@ describe('Firebase Messaging Integration Tests > update a token', function() {
4949
return;
5050
}
5151

52-
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function() {
53-
before(async function() {
52+
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function () {
53+
before(async function () {
5454
// Use one webDriver per browser instead of one per test to speed up test.
5555
globalWebDriver = createPermittedWebDriver(
5656
/* browser= */ assistantBrowser.getId()
@@ -60,15 +60,15 @@ describe('Firebase Messaging Integration Tests > update a token', function() {
6060
);
6161
});
6262

63-
after(async function() {
63+
after(async function () {
6464
await seleniumAssistant.killWebDriver(globalWebDriver);
6565
});
6666

67-
afterEach(async function() {
67+
afterEach(async function () {
6868
await clearAppForTest(globalWebDriver);
6969
});
7070

71-
it(`should update a token`, async function() {
71+
it(`should update a token`, async function () {
7272
const token = await retrieveToken(globalWebDriver);
7373
expect(token).to.exist;
7474

integration/messaging/test/test-useDefaultServiceWorker.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,31 @@ const createPermittedWebDriver = require('./utils/createPermittedWebDriver');
2424
const TEST_DOMAIN = 'default-sw';
2525
const TEST_SUITE_TIMEOUT_MS = 70000;
2626

27-
describe(`Firebase Messaging Integration Tests > Use 'firebase-messaging-sw.js' by default`, function() {
27+
describe(`Firebase Messaging Integration Tests > Use 'firebase-messaging-sw.js' by default`, function () {
2828
this.timeout(TEST_SUITE_TIMEOUT_MS);
2929

3030
this.retries(3);
3131

3232
let globalWebDriver;
3333

34-
before(async function() {
34+
before(async function () {
3535
await testServer.start();
3636
});
3737

38-
after(async function() {
38+
after(async function () {
3939
await testServer.stop();
4040
await seleniumAssistant.killWebDriver(globalWebDriver);
4141
});
4242

43-
it(`should use default SW by default`, async function() {
43+
it(`should use default SW by default`, async function () {
4444
globalWebDriver = createPermittedWebDriver('chrome');
4545
await globalWebDriver.get(`${testServer.serverAddress}/${TEST_DOMAIN}/`);
4646

4747
// If we have a token, then we know the default SW worked.
4848
const token = await retrieveToken(globalWebDriver);
4949
expect(token).to.exist;
5050

51-
const result = await globalWebDriver.executeAsyncScript(function(cb) {
51+
const result = await globalWebDriver.executeAsyncScript(function (cb) {
5252
navigator.serviceWorker
5353
.getRegistrations()
5454
.then(swReg => {

integration/messaging/test/test-useValidManifest.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ const createPermittedWebDriver = require('./utils/createPermittedWebDriver');
2424
const TEST_DOMAIN = 'valid-manifest';
2525
const TEST_SUITE_TIMEOUT_MS = 70000;
2626

27-
describe(`Firebase Messaging Integration Tests > Use 'use valid manifest`, function() {
27+
describe(`Firebase Messaging Integration Tests > Use 'use valid manifest`, function () {
2828
this.timeout(TEST_SUITE_TIMEOUT_MS);
2929

3030
this.retries(3);
3131

3232
let globalWebDriver;
3333

34-
before(async function() {
34+
before(async function () {
3535
await testServer.start();
3636
});
3737

38-
after(async function() {
38+
after(async function () {
3939
await testServer.stop();
4040
await seleniumAssistant.killWebDriver(globalWebDriver);
4141
});
4242

43-
it(`should allow valid manifest`, async function() {
43+
it(`should allow valid manifest`, async function () {
4444
globalWebDriver = createPermittedWebDriver('chrome');
4545
await globalWebDriver.get(`${testServer.serverAddress}/${TEST_DOMAIN}/`);
4646

integration/shared/validator.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@ function validateNamespace(definition, candidate) {
2222
const keys = Object.keys(definition).filter(key => !~key.indexOf('__'));
2323

2424
if (!validatedVersion) {
25-
describe('Firebase SDK Version', function() {
26-
it('Should be properly defined', function() {
25+
describe('Firebase SDK Version', function () {
26+
it('Should be properly defined', function () {
2727
__expect(candidate.SDK_VERSION).to.equal(
2828
require('../../packages/firebase/package.json').version
2929
);
@@ -54,12 +54,12 @@ function validateNamespace(definition, candidate) {
5454
iKey => ~iKey.indexOf('__return')
5555
);
5656

57-
describe(`${key}`, function() {
57+
describe(`${key}`, function () {
5858
/**
5959
* Tests of the actual API
6060
*/
6161
if (definitionChunk.__type) {
62-
it(`Should be a \`${definitionChunk.__type}\``, function() {
62+
it(`Should be a \`${definitionChunk.__type}\``, function () {
6363
__expect(candidateChunk).to.be.a(definitionChunk.__type);
6464
});
6565
}

integration/typescript/karma.conf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ const karmaBase = require('../../config/karma.base');
2121

2222
const files = ['test/**/*.test.*'];
2323

24-
module.exports = function(config) {
24+
module.exports = function (config) {
2525
const karmaConfig = Object.assign({}, karmaBase, {
2626
// files to load into karma
2727
files: files,

integration/typescript/test/namespace.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ firebase.initializeApp({
2929
appId: 'myAppId'
3030
});
3131

32-
describe('Firebase Namespace Validation', function() {
32+
describe('Firebase Namespace Validation', function () {
3333
validateNamespace(namespaceDefinition, firebase);
3434
});

integration/webpack/karma.conf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ const karmaBase = require('../../config/karma.base');
2121

2222
const files = [`dist/**/*`];
2323

24-
module.exports = function(config) {
24+
module.exports = function (config) {
2525
const karmaConfig = Object.assign({}, karmaBase, {
2626
// files to load into karma
2727
files: files,

0 commit comments

Comments
 (0)