Skip to content

Commit bcb8b81

Browse files
Fix lint issues in react and browser packages
1 parent f5a6ee0 commit bcb8b81

9 files changed

Lines changed: 14 additions & 12 deletions

File tree

packages/browser/src/utils/http.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,20 @@ import {AsgardeoSPAClient} from '../__legacy__/client';
3232
* ```typescript
3333
* // Use default instance
3434
* const httpClient = http();
35-
*
35+
*
3636
* // Use specific instance
3737
* const httpInstance1 = http(1);
3838
* const httpInstance2 = http(2);
3939
* ```
4040
*/
41-
export const http = (instanceId: number = 0): {
41+
export const http = (
42+
instanceId: number = 0,
43+
): {
4244
request: typeof AsgardeoSPAClient.prototype.httpRequest;
4345
requestAll: typeof AsgardeoSPAClient.prototype.httpRequestAll;
4446
} => {
45-
const client = AsgardeoSPAClient.getInstance(instanceId);
46-
47+
const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);
48+
4749
return {
4850
/**
4951
* Makes a single HTTP request using the AsgardeoSPAClient instance.

packages/react/src/api/createOrganization.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const createOrganization = async ({
9898
...requestConfig
9999
}: CreateOrganizationConfig): Promise<Organization> => {
100100
const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {
101-
const client = AsgardeoSPAClient.getInstance(instanceId);
101+
const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);
102102
const httpClient: HttpInstance = client.httpRequest.bind(client);
103103
const response: HttpResponse<any> = await httpClient({
104104
data: config.body ? JSON.parse(config.body as string) : undefined,

packages/react/src/api/getAllOrganizations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const getAllOrganizations = async ({
9090
...requestConfig
9191
}: GetAllOrganizationsConfig): Promise<AllOrganizationsApiResponse> => {
9292
const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {
93-
const client = AsgardeoSPAClient.getInstance(instanceId);
93+
const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);
9494
const httpClient: HttpInstance = client.httpRequest.bind(client);
9595
const response: HttpResponse<any> = await httpClient({
9696
headers: config.headers as Record<string, string>,

packages/react/src/api/getMeOrganizations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const getMeOrganizations = async ({
9494
...requestConfig
9595
}: GetMeOrganizationsConfig): Promise<Organization[]> => {
9696
const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {
97-
const client = AsgardeoSPAClient.getInstance(instanceId);
97+
const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);
9898
const httpClient: HttpInstance = client.httpRequest.bind(client);
9999
const response: HttpResponse<any> = await httpClient({
100100
headers: config.headers as Record<string, string>,

packages/react/src/api/getOrganization.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const getOrganization = async ({
8686
...requestConfig
8787
}: GetOrganizationConfig): Promise<OrganizationDetails> => {
8888
const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {
89-
const client = AsgardeoSPAClient.getInstance(instanceId);
89+
const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);
9090
const httpClient: HttpInstance = client.httpRequest.bind(client);
9191
const response: HttpResponse<any> = await httpClient({
9292
headers: config.headers as Record<string, string>,

packages/react/src/api/getSchemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export interface GetSchemasConfig extends Omit<BaseGetSchemasConfig, 'fetcher'>
8080
*/
8181
const getSchemas = async ({fetcher, instanceId = 0, ...requestConfig}: GetSchemasConfig): Promise<Schema[]> => {
8282
const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {
83-
const client = AsgardeoSPAClient.getInstance(instanceId);
83+
const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);
8484
const httpClient: HttpInstance = client.httpRequest.bind(client);
8585
const response: HttpResponse<any> = await httpClient({
8686
headers: config.headers as Record<string, string>,

packages/react/src/api/getScim2Me.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export interface GetScim2MeConfig extends Omit<BaseGetScim2MeConfig, 'fetcher'>
8080
*/
8181
const getScim2Me = async ({fetcher, instanceId = 0, ...requestConfig}: GetScim2MeConfig): Promise<User> => {
8282
const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {
83-
const client = AsgardeoSPAClient.getInstance(instanceId);
83+
const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);
8484
const httpClient: HttpInstance = client.httpRequest.bind(client);
8585
const response: HttpResponse<any> = await httpClient({
8686
headers: config.headers as Record<string, string>,

packages/react/src/api/updateMeProfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export interface UpdateMeProfileConfig extends Omit<BaseUpdateMeProfileConfig, '
6868
*/
6969
const updateMeProfile = async ({fetcher, instanceId = 0, ...requestConfig}: UpdateMeProfileConfig): Promise<User> => {
7070
const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {
71-
const client = AsgardeoSPAClient.getInstance(instanceId);
71+
const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);
7272
const httpClient: HttpInstance = client.httpRequest.bind(client);
7373
const response: HttpResponse<any> = await httpClient({
7474
data: config.body ? JSON.parse(config.body as string) : undefined,

packages/react/src/api/updateOrganization.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const updateOrganization = async ({
9393
...requestConfig
9494
}: UpdateOrganizationConfig): Promise<OrganizationDetails> => {
9595
const defaultFetcher = async (url: string, config: RequestInit): Promise<Response> => {
96-
const client = AsgardeoSPAClient.getInstance(instanceId);
96+
const client: AsgardeoSPAClient = AsgardeoSPAClient.getInstance(instanceId);
9797
const httpClient: HttpInstance = client.httpRequest.bind(client);
9898
const response: HttpResponse<any> = await httpClient({
9999
data: config.body ? JSON.parse(config.body as string) : undefined,

0 commit comments

Comments
 (0)