Skip to content

Commit e77cc2c

Browse files
committed
fix: prettier
1 parent 4990076 commit e77cc2c

File tree

10 files changed

+33
-21
lines changed

10 files changed

+33
-21
lines changed

src/@types/globals.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ declare global {
2323
renderButton: (
2424
parent: HTMLElement,
2525
options: GsiButtonConfiguration,
26-
clickHandler?: () => void
26+
clickHandler?: () => void,
2727
) => void;
2828
disableAutoSelect: () => void;
2929
storeCredential: (
3030
credential: { id: string; password: string },
31-
callback?: () => void
31+
callback?: () => void,
3232
) => void;
3333
cancel: () => void;
3434
onGoogleLibraryLoad: () => void;
@@ -37,7 +37,7 @@ declare global {
3737
oauth2: {
3838
initTokenClient: (config: TokenClientConfig) => {
3939
requestAccessToken: (
40-
overridableClientConfig?: OverridableTokenClientConfig
40+
overridableClientConfig?: OverridableTokenClientConfig,
4141
) => void;
4242
};
4343
initCodeClient: (config: CodeClientConfig) => CodeClient;

src/App.vue

+16-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const { isReady: isTokenClientReady, login: loginTokenClient } = useTokenClient(
2929
onSuccess: (resp) => console.log(resp),
3030
onError: (resp) => console.error(resp),
3131
prompt: "consent",
32-
}
32+
},
3333
);
3434
3535
useOneTap({
@@ -138,10 +138,22 @@ body {
138138
min-height: 100vh;
139139
color: var(--color-text);
140140
background: var(--color-background);
141-
transition: color 0.5s, background-color 0.5s;
141+
transition:
142+
color 0.5s,
143+
background-color 0.5s;
142144
line-height: 1.6;
143-
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
144-
Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue",
145+
font-family:
146+
Inter,
147+
-apple-system,
148+
BlinkMacSystemFont,
149+
"Segoe UI",
150+
Roboto,
151+
Oxygen,
152+
Ubuntu,
153+
Cantarell,
154+
"Fira Sans",
155+
"Droid Sans",
156+
"Helvetica Neue",
145157
sans-serif;
146158
font-size: 15px;
147159
text-rendering: optimizeLegibility;

src/composables/useCodeClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export interface UseCodeClientReturn {
101101
* @return {*} {UseCodeClientReturn}
102102
*/
103103
export default function useCodeClient(
104-
options: ImplicitFlowOptions = {}
104+
options: ImplicitFlowOptions = {},
105105
): UseCodeClientReturn {
106106
const { scope = "", onError, onSuccess, ...rest } = options;
107107

src/composables/useGsiScript.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ watch(
3838
if (newCount > 0 && !loaded.value && !isLoading.value) {
3939
initialize();
4040
}
41-
}
41+
},
4242
);
4343

4444
export type UseGsiScriptReturn = {

src/composables/useOneTap.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface UseGoogleOneTapLoginOptions {
3030
* @memberof UseGoogleOneTapLoginOptions
3131
*/
3232
onPromptMomentNotification?: (
33-
promptMomentNotification: PromptMomentNotification
33+
promptMomentNotification: PromptMomentNotification,
3434
) => void;
3535

3636
/**
@@ -169,7 +169,7 @@ export interface UseOneTapResult {
169169
* @return {*} {UseOneTapResult}
170170
*/
171171
export default function useOneTap(
172-
options?: UseGoogleOneTapLoginOptions
172+
options?: UseGoogleOneTapLoginOptions,
173173
): UseOneTapResult {
174174
const {
175175
disableAutomaticPrompt = false,
@@ -196,7 +196,7 @@ export default function useOneTap(
196196
const login = () =>
197197
isReady.value &&
198198
window.google?.accounts.id.prompt((notification) =>
199-
onPromptMomentNotification?.(notification)
199+
onPromptMomentNotification?.(notification),
200200
);
201201

202202
watchEffect((onCleanup) => {
@@ -246,7 +246,7 @@ export default function useOneTap(
246246

247247
if (shouldAutoLogin) {
248248
window.google?.accounts.id.prompt((notification) =>
249-
onPromptMomentNotification?.(notification)
249+
onPromptMomentNotification?.(notification),
250250
);
251251
}
252252

src/composables/useTokenClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export interface UseTokenClientReturn {
9292
* @return {*} {UseTokenClientReturn}
9393
*/
9494
export default function useTokenClient(
95-
options: AuthCodeFlowOptions = {}
95+
options: AuthCodeFlowOptions = {},
9696
): UseTokenClientReturn {
9797
const { scope = "", onError, onSuccess, ...rest } = options;
9898

src/interfaces/accounts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ export interface GsiButtonConfiguration {
392392
}
393393

394394
export type MomentListener = (
395-
promptMomentNotification: PromptMomentNotification
395+
promptMomentNotification: PromptMomentNotification,
396396
) => void;
397397

398398
export interface RevocationResponse {

src/plugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const plugin: Plugin = {
4444
install(app: App, options: GoogleSignInPluginOptions) {
4545
if (!options) {
4646
throw new Error(
47-
toPluginError(`initialize plugin by passing an options object`)
47+
toPluginError(`initialize plugin by passing an options object`),
4848
);
4949
}
5050

src/utils/account.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function decodeCredential(credential: string): DecodedGoogleUser {
2929
.atob(base64)
3030
.split("")
3131
.map((c) => `%${("00" + c.charCodeAt(0).toString(16)).slice(-2)}`)
32-
.join("")
32+
.join(""),
3333
);
3434
const decodedToken = JSON.parse(jsonPayload);
3535
return {

src/utils/oauth2.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function hasGrantedAllScopes(
1818
window.google?.accounts.oauth2.hasGrantedAllScopes(
1919
tokenResponse,
2020
firstScope,
21-
...restScopes
21+
...restScopes,
2222
) || false
2323
);
2424
}
@@ -41,7 +41,7 @@ export function hasGrantedAnyScopes(
4141
window.google?.accounts.oauth2.hasGrantedAnyScope(
4242
tokenResponse,
4343
firstScope,
44-
...restScopes
44+
...restScopes,
4545
) || false
4646
);
4747
}
@@ -72,7 +72,7 @@ export type ImplicitFlowOptions = Omit<
7272
* @return {string}
7373
*/
7474
export function buildCodeRequestRedirectUrl(
75-
options: ImplicitFlowOptions
75+
options: ImplicitFlowOptions,
7676
): string {
7777
const baseUrl = "https://accounts.google.com/o/oauth2/v2/auth";
7878

@@ -106,7 +106,7 @@ export function buildCodeRequestRedirectUrl(
106106
} else {
107107
queryParams.append(
108108
"enable_serial_consent",
109-
`${options.enable_serial_consent}`
109+
`${options.enable_serial_consent}`,
110110
);
111111
}
112112

0 commit comments

Comments
 (0)