Skip to content

Commit

Permalink
updated linter rules
Browse files Browse the repository at this point in the history
  • Loading branch information
vzakharchenko committed Jul 18, 2021
1 parent f954997 commit 221a5e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@
},
"rules": {
"no-undef": 0,
"no-process-env": 0,
"no-unused-vars": 0,
"require-await": 0,
"@typescript-eslint/no-explicit-any": 0,
"id-length": 0,
"no-return-await": 0,
"@typescript-eslint/explicit-module-boundary-types": 0
"no-return-await": 0
}
}
4 changes: 2 additions & 2 deletions typescript/cache/AdapterCache.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface AdapterCache {
put(region: string, key: string, value: any, ttl?: number): Promise<void>;
put(region: string, key: string, value: any, ttl?: number): Promise<void>|void;

get(region: string, key: string): Promise<string | undefined>;
get(region: string, key: string): Promise<string | undefined>|string|undefined;
}
4 changes: 2 additions & 2 deletions typescript/cache/DefaultCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const rptCache = new NodeCache({stdTTL: 1800, errorOnMissing: false});
const resourceCache = new NodeCache({stdTTL: 30, errorOnMissing: false});

export class DefaultCache implements AdapterCache {
async get(region: string, key: string): Promise<string | undefined> {
get(region: string, key: string): string|undefined {
if (region === 'publicKey') {
return defaultCache.get(key);
} if (region === 'uma2-configuration') {
Expand All @@ -22,7 +22,7 @@ export class DefaultCache implements AdapterCache {
throw new Error('Unsupported Region');
}

async put(region: string, key: string, value: any, ttl: number): Promise<void> {
put(region: string, key: string, value: any, ttl: number): void {
if (region === 'publicKey') {
defaultCache.set(key, value, ttl);
} else if (region === 'uma2-configuration') {
Expand Down

0 comments on commit 221a5e9

Please sign in to comment.