Skip to content

Commit b18ccaa

Browse files
Fix lint issues in vue, express, node, i18n, react-router, tanstack-router
1 parent bf86882 commit b18ccaa

35 files changed

+507
-430
lines changed

packages/express/.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/dist
22
/build
33
/node_modules
4-
/coverage
4+
/coverage
5+
/src/__legacy__

packages/express/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Copyright (c) 2022, WSO2 Inc. (http://www.wso2.com) All Rights Reserved.
2+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
33
*
4-
* WSO2 Inc. licenses this file to you under the Apache License,
4+
* WSO2 LLC. licenses this file to you under the Apache License,
55
* Version 2.0 (the "License"); you may not use this file except
66
* in compliance with the License.
77
* You may obtain a copy of the License at
@@ -16,7 +16,7 @@
1616
* under the License.
1717
*/
1818

19-
export * from "./__legacy__/models";
20-
export * from "./__legacy__/client";
19+
export * from './__legacy__/models';
20+
export * from './__legacy__/client';
2121

2222
export * from '@asgardeo/node';

packages/express/vitest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* under the License.
1717
*/
1818

19+
// eslint-disable-next-line import/no-extraneous-dependencies
1920
import {defineConfig} from 'vitest/config';
2021

2122
export default defineConfig({

packages/i18n/src/translations/hi-IN.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818

1919
/* eslint-disable sort-keys */
20+
/* eslint-disable @typescript-eslint/naming-convention */
2021

2122
import {I18nTranslations, I18nMetadata, I18nBundle} from '../models/i18n';
2223

packages/i18n/src/utils/__tests__/getDefaultI18nBundles.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
*/
1818

1919
import {describe, expect, it} from 'vitest';
20-
import getDefaultI18nBundles from '../getDefaultI18nBundles';
2120
import TranslationBundleConstants from '../../constants/TranslationBundleConstants';
2221
import type {I18nBundle} from '../../models/i18n';
2322
import {en_US} from '../../translations';
23+
import getDefaultI18nBundles from '../getDefaultI18nBundles';
2424

2525
describe('getDefaultI18nBundles', (): void => {
2626
it('should return a collection of i18n bundles', (): void => {
@@ -86,7 +86,7 @@ describe('getDefaultI18nBundles', (): void => {
8686
const bundles: Record<string, I18nBundle> = getDefaultI18nBundles();
8787

8888
Object.values(bundles).forEach((bundle: I18nBundle) => {
89-
const translations = bundle.translations;
89+
const {translations} = bundle;
9090

9191
expect(translations).toHaveProperty('elements.buttons.signin.text');
9292
expect(translations).toHaveProperty('elements.buttons.signout.text');

packages/i18n/vitest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* under the License.
1717
*/
1818

19+
// eslint-disable-next-line import/no-extraneous-dependencies
1920
import {defineConfig} from 'vitest/config';
2021

2122
export default defineConfig({

packages/node/src/__legacy__/client.ts

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) {{year}}, WSO2 LLC. (https://www.wso2.com).
2+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
33
*
44
* WSO2 LLC. licenses this file to you under the Apache License,
55
* Version 2.0 (the "License"); you may not use this file except
@@ -37,7 +37,7 @@ import {AuthURLCallback} from './models';
3737
* @class AsgardeoNodeClient
3838
*/
3939
export class AsgardeoNodeClient<T> {
40-
private _authCore: AsgardeoNodeCore<T>;
40+
private authCore: AsgardeoNodeCore<T>;
4141

4242
/**
4343
* This is the constructor method that returns an instance of the `AsgardeoNodeClient` class.
@@ -60,10 +60,11 @@ export class AsgardeoNodeClient<T> {
6060
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#constructor
6161
* @preserve
6262
*/
63+
// eslint-disable-next-line @typescript-eslint/no-empty-function
6364
constructor() {}
6465

6566
public async initialize(config: AuthClientConfig<T>, store?: Storage): Promise<boolean> {
66-
this._authCore = new AsgardeoNodeCore(config, store);
67+
this.authCore = new AsgardeoNodeCore(config, store);
6768

6869
return Promise.resolve(true);
6970
}
@@ -108,7 +109,7 @@ export class AsgardeoNodeClient<T> {
108109
state?: string,
109110
signInConfig?: Record<string, string | boolean>,
110111
): Promise<TokenResponse> {
111-
return this._authCore.signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig);
112+
return this.authCore.signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig);
112113
}
113114

114115
/**
@@ -117,7 +118,7 @@ export class AsgardeoNodeClient<T> {
117118
* @returns {Promise<AuthClientConfig<Config>>} - A promise that resolves with the configuration data.
118119
*/
119120
public async getConfigData(): Promise<AuthClientConfig<T>> {
120-
return this._authCore.getConfigData();
121+
return this.authCore.getConfigData();
121122
}
122123

123124
/**
@@ -138,7 +139,7 @@ export class AsgardeoNodeClient<T> {
138139
*
139140
*/
140141
public async signOut(userId: string): Promise<string> {
141-
return this._authCore.signOut(userId);
142+
return this.authCore.signOut(userId);
142143
}
143144

144145
/**
@@ -159,7 +160,7 @@ export class AsgardeoNodeClient<T> {
159160
*
160161
*/
161162
public async isSignedIn(userId: string): Promise<boolean> {
162-
return this._authCore.isSignedIn(userId);
163+
return this.authCore.isSignedIn(userId);
163164
}
164165

165166
/**
@@ -180,7 +181,7 @@ export class AsgardeoNodeClient<T> {
180181
*
181182
*/
182183
public async getIdToken(userId: string): Promise<string> {
183-
return this._authCore.getIdToken(userId);
184+
return this.authCore.getIdToken(userId);
184185
}
185186

186187
/**
@@ -202,7 +203,7 @@ export class AsgardeoNodeClient<T> {
202203
*
203204
*/
204205
public async getUser(userId: string): Promise<User> {
205-
return this._authCore.getUser(userId);
206+
return this.authCore.getUser(userId);
206207
}
207208

208209
/**
@@ -221,7 +222,7 @@ export class AsgardeoNodeClient<T> {
221222
*
222223
*/
223224
public async getOpenIDProviderEndpoints(): Promise<OIDCEndpoints> {
224-
return this._authCore.getOpenIDProviderEndpoints();
225+
return this.authCore.getOpenIDProviderEndpoints();
225226
}
226227

227228
/**
@@ -243,7 +244,7 @@ export class AsgardeoNodeClient<T> {
243244
*
244245
*/
245246
public async getDecodedIdToken(userId?: string, idToken?: string): Promise<IdToken> {
246-
return this._authCore.getDecodedIdToken(userId, idToken);
247+
return this.authCore.getDecodedIdToken(userId, idToken);
247248
}
248249

249250
/**
@@ -265,7 +266,7 @@ export class AsgardeoNodeClient<T> {
265266
*
266267
*/
267268
public async getAccessToken(userId?: string): Promise<string> {
268-
return this._authCore.getAccessToken(userId);
269+
return this.authCore.getAccessToken(userId);
269270
}
270271

271272
/**
@@ -309,7 +310,7 @@ export class AsgardeoNodeClient<T> {
309310
*
310311
*/
311312
public async exchangeToken(config: TokenExchangeRequestConfig, userId?: string): Promise<TokenResponse | Response> {
312-
return this._authCore.exchangeToken(config, userId);
313+
return this.authCore.exchangeToken(config, userId);
313314
}
314315

315316
/**
@@ -332,11 +333,11 @@ export class AsgardeoNodeClient<T> {
332333
*
333334
*/
334335
public async reInitialize(config: Partial<AuthClientConfig<T>>): Promise<void> {
335-
return this._authCore.reInitialize(config);
336+
return this.authCore.reInitialize(config);
336337
}
337338

338339
public async getSignInUrl(requestConfig?: ExtendedAuthorizeRequestUrlParams, userId?: string): Promise<string> {
339-
return this._authCore.getAuthURL(userId, requestConfig);
340+
return this.authCore.getAuthURL(userId, requestConfig);
340341
}
341342

342343
/**
@@ -357,7 +358,7 @@ export class AsgardeoNodeClient<T> {
357358
*
358359
*/
359360
public async revokeAccessToken(userId?: string): Promise<Response> {
360-
return this._authCore.revokeAccessToken(userId);
361+
return this.authCore.revokeAccessToken(userId);
361362
}
362363

363364
/**
@@ -379,7 +380,7 @@ export class AsgardeoNodeClient<T> {
379380
* @memberof AsgardeoNodeClient
380381
*/
381382
public refreshAccessToken(userId?: string): Promise<TokenResponse> {
382-
return this._authCore.refreshAccessToken(userId);
383+
return this.authCore.refreshAccessToken(userId);
383384
}
384385

385386
/**
@@ -425,6 +426,6 @@ export class AsgardeoNodeClient<T> {
425426
}
426427

427428
public async getStorageManager(): Promise<StorageManager<T>> {
428-
return this._authCore.getStorageManager();
429+
return this.authCore.getStorageManager();
429430
}
430431
}
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/**
2-
* Copyright (c) 2022, WSO2 Inc. (http://www.wso2.com) All Rights Reserved.
3-
*
4-
* WSO2 Inc. licenses this file to you under the Apache License,
5-
* Version 2.0 (the "License"); you may not use this file except
6-
* in compliance with the License.
7-
* You may obtain a copy of the License at
8-
*
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
11-
* Unless required by applicable law or agreed to in writing,
12-
* software distributed under the License is distributed on an
13-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
* KIND, either express or implied. See the License for the
15-
* specific language governing permissions and limitations
16-
* under the License.
17-
*/
2+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3+
*
4+
* WSO2 LLC. licenses this file to you under the Apache License,
5+
* Version 2.0 (the "License"); you may not use this file except
6+
* in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing,
12+
* software distributed under the License is distributed on an
13+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
* KIND, either express or implied. See the License for the
15+
* specific language governing permissions and limitations
16+
* under the License.
17+
*/
1818

19-
export * from "./uuid-config";
20-
export * from "./logger-config";
19+
export * from './uuid-config';
20+
export * from './logger-config';
Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Copyright (c) 2022, WSO2 Inc. (http://www.wso2.com) All Rights Reserved.
2+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
33
*
4-
* WSO2 Inc. licenses this file to you under the Apache License,
4+
* WSO2 LLC. licenses this file to you under the Apache License,
55
* Version 2.0 (the "License"); you may not use this file except
66
* in compliance with the License.
77
* You may obtain a copy of the License at
@@ -16,15 +16,28 @@
1616
* under the License.
1717
*/
1818

19-
export const LOGGER_CONFIG = {
20-
bgGreen: "\x1b[42m",
21-
bgRed: "\x1b[41m",
22-
bgWhite: "\x1b[47m",
23-
bgYellow: "\x1b[43m",
24-
fgBlack: "\x1b[30m",
25-
fgGreen: "\x1b[32m",
26-
fgRed: "\x1b[31m",
27-
fgWhite: "\x1b[37m",
28-
fgYellow: "\x1b[33m",
29-
reset: "\x1b[0m"
19+
interface LoggerConfig {
20+
bgGreen: string;
21+
bgRed: string;
22+
bgWhite: string;
23+
bgYellow: string;
24+
fgBlack: string;
25+
fgGreen: string;
26+
fgRed: string;
27+
fgWhite: string;
28+
fgYellow: string;
29+
reset: string;
3030
}
31+
32+
export const LOGGER_CONFIG: LoggerConfig = {
33+
bgGreen: '\x1b[42m',
34+
bgRed: '\x1b[41m',
35+
bgWhite: '\x1b[47m',
36+
bgYellow: '\x1b[43m',
37+
fgBlack: '\x1b[30m',
38+
fgGreen: '\x1b[32m',
39+
fgRed: '\x1b[31m',
40+
fgWhite: '\x1b[37m',
41+
fgYellow: '\x1b[33m',
42+
reset: '\x1b[0m',
43+
};

packages/node/src/__legacy__/constants/uuid-config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Copyright (c) 2022, WSO2 Inc. (http://www.wso2.com) All Rights Reserved.
2+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
33
*
4-
* WSO2 Inc. licenses this file to you under the Apache License,
4+
* WSO2 LLC. licenses this file to you under the Apache License,
55
* Version 2.0 (the "License"); you may not use this file except
66
* in compliance with the License.
77
* You may obtain a copy of the License at
@@ -16,4 +16,4 @@
1616
* under the License.
1717
*/
1818

19-
export const UUID_VERSION = 4;
19+
export const UUID_VERSION: number = 4;

0 commit comments

Comments
 (0)