Skip to content

Commit d83a3f0

Browse files
committed
chore: run lint:fix
1 parent e40d433 commit d83a3f0

File tree

71 files changed

+174
-172
lines changed

Some content is hidden

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

71 files changed

+174
-172
lines changed

adminSDK/reports/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function listLoginEvents() {
4747
console.log('Logins:');
4848
activities.forEach((activity) => {
4949
console.log(
50-
`${activity.id?.time}: ${activity.actor?.email} (${activity.events?.[0]?.name})`,
50+
`${activity.id?.time}: ${activity.actor?.email} (${activity.events?.[0]?.name})`,
5151
);
5252
});
5353
}

chat/client-libraries/cloud/authentication-utils.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const APP_AUTH_OAUTH_SCOPES = ['https://www.googleapis.com/auth/chat.bot'];
3131
// User authentication
3232
const CLIENT_SECRETS_FILE = './credentials.json';
3333
const CLIENT_SECRETS = JSON.parse(
34-
await readFile(new URL(CLIENT_SECRETS_FILE, import.meta.url), 'utf8'),
34+
await readFile(new URL(CLIENT_SECRETS_FILE, import.meta.url), 'utf8'),
3535
).web;
3636

3737
/**
@@ -73,9 +73,9 @@ function getAuthenticatedUserOAuth2Client(scopes) {
7373
return new Promise((resolve, reject) => {
7474
// Create a client based on client secrets
7575
const oAuth2Client = new OAuth2Client(
76-
CLIENT_SECRETS.client_id,
77-
CLIENT_SECRETS.client_secret,
78-
CLIENT_SECRETS.redirect_uris[0],
76+
CLIENT_SECRETS.client_id,
77+
CLIENT_SECRETS.client_secret,
78+
CLIENT_SECRETS.redirect_uris[0],
7979
);
8080

8181
// Generate the URL to use for consent
@@ -86,31 +86,31 @@ function getAuthenticatedUserOAuth2Client(scopes) {
8686

8787
// Open an HTTP server to accept the OAuth2 callback
8888
const server = http
89-
.createServer(async (request, response) => {
90-
try {
91-
if (request.url.indexOf('/oauth2callback') > -1) {
89+
.createServer(async (request, response) => {
90+
try {
91+
if (request.url.indexOf('/oauth2callback') > -1) {
9292
// Acquire the code and close the server.
93-
const queryString = new url.URL(
94-
request.url,
95-
'http://localhost:3000',
96-
).searchParams;
97-
const code = queryString.get('code');
98-
response.end('Done!');
99-
server.destroy();
100-
// Acquire the tokens
101-
const r = await oAuth2Client.getToken(code);
102-
// Update credentials of the OAuth2 client.
103-
oAuth2Client.setCredentials(r.tokens);
104-
resolve(oAuth2Client);
105-
}
106-
} catch (e) {
107-
reject(e);
93+
const queryString = new url.URL(
94+
request.url,
95+
'http://localhost:3000',
96+
).searchParams;
97+
const code = queryString.get('code');
98+
response.end('Done!');
99+
server.destroy();
100+
// Acquire the tokens
101+
const r = await oAuth2Client.getToken(code);
102+
// Update credentials of the OAuth2 client.
103+
oAuth2Client.setCredentials(r.tokens);
104+
resolve(oAuth2Client);
108105
}
109-
})
110-
.listen(3000, () => {
106+
} catch (e) {
107+
reject(e);
108+
}
109+
})
110+
.listen(3000, () => {
111111
// Open default browser and start the flow
112-
open(authorizeUrl, {wait: false}).then((cp) => cp.unref());
113-
});
112+
open(authorizeUrl, {wait: false}).then((cp) => cp.unref());
113+
});
114114
destroyer(server);
115115
});
116116
}

chat/client-libraries/cloud/create-custom-emoji-user-cred.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const USER_AUTH_OAUTH_SCOPES = [
2727
async function main() {
2828
// Create a client
2929
const chatClient = await createClientWithUserCredentials(
30-
USER_AUTH_OAUTH_SCOPES,
30+
USER_AUTH_OAUTH_SCOPES,
3131
);
3232

3333
// TODO(developer) Replace FILENAME here.

chat/client-libraries/cloud/create-membership-user-cred-for-app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const USER_AUTH_OAUTH_SCOPES = [
2727
async function main() {
2828
// Create a client
2929
const chatClient = await createClientWithUserCredentials(
30-
USER_AUTH_OAUTH_SCOPES,
30+
USER_AUTH_OAUTH_SCOPES,
3131
);
3232

3333
// Initialize request argument(s)

chat/client-libraries/cloud/create-membership-user-cred-for-group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const USER_AUTH_OAUTH_SCOPES = [
2727
async function main() {
2828
// Create a client
2929
const chatClient = await createClientWithUserCredentials(
30-
USER_AUTH_OAUTH_SCOPES,
30+
USER_AUTH_OAUTH_SCOPES,
3131
);
3232

3333
// Initialize request argument(s)

chat/client-libraries/cloud/create-membership-user-cred.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const USER_AUTH_OAUTH_SCOPES = [
2727
async function main() {
2828
// Create a client
2929
const chatClient = await createClientWithUserCredentials(
30-
USER_AUTH_OAUTH_SCOPES,
30+
USER_AUTH_OAUTH_SCOPES,
3131
);
3232

3333
// Initialize request argument(s)

chat/client-libraries/cloud/create-message-app-cred.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function main() {
3131
message: {
3232
text:
3333
'👋🌎 Hello world! I created this message by calling ' +
34-
'the Chat API\'s `messages.create()` method.',
34+
"the Chat API's `messages.create()` method.",
3535
cardsV2: [
3636
{
3737
card: {
@@ -69,19 +69,19 @@ async function main() {
6969
],
7070
},
7171
{
72-
header: 'What\'s next',
72+
header: "What's next",
7373
collapsible: true,
7474
widgets: [
7575
{
7676
textParagraph: {
77-
text: '❤️ <a href=\'https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions/create\'>Add a reaction</a>.',
77+
text: "❤️ <a href='https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions/create'>Add a reaction</a>.",
7878
},
7979
},
8080
{
8181
textParagraph: {
8282
text:
83-
'🔄 <a href=\'https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/patch\'>Update</a> ' +
84-
'or ❌ <a href=\'https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/delete\'>delete</a> ' +
83+
"🔄 <a href='https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/patch'>Update</a> " +
84+
"or ❌ <a href='https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/delete'>delete</a> " +
8585
'the message.',
8686
},
8787
},

chat/client-libraries/cloud/create-message-user-cred-at-mention.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const USER_AUTH_OAUTH_SCOPES = [
2727
async function main() {
2828
// Create a client
2929
const chatClient = await createClientWithUserCredentials(
30-
USER_AUTH_OAUTH_SCOPES,
30+
USER_AUTH_OAUTH_SCOPES,
3131
);
3232

3333
// Initialize request argument(s)

chat/client-libraries/cloud/create-message-user-cred-message-id.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const USER_AUTH_OAUTH_SCOPES = [
2727
async function main() {
2828
// Create a client
2929
const chatClient = await createClientWithUserCredentials(
30-
USER_AUTH_OAUTH_SCOPES,
30+
USER_AUTH_OAUTH_SCOPES,
3131
);
3232

3333
// Initialize request argument(s)

chat/client-libraries/cloud/create-message-user-cred-request-id.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const USER_AUTH_OAUTH_SCOPES = [
2727
async function main() {
2828
// Create a client
2929
const chatClient = await createClientWithUserCredentials(
30-
USER_AUTH_OAUTH_SCOPES,
30+
USER_AUTH_OAUTH_SCOPES,
3131
);
3232

3333
// Initialize request argument(s)

0 commit comments

Comments
 (0)