Lint/format cleanup: void-expression and empty-function fixes, optional-chain narrowing, ignore share/ in eslint+prettier
This commit is contained in:
parent
3cd9a2377a
commit
99419880a7
11 changed files with 208 additions and 75 deletions
|
|
@ -16,7 +16,7 @@ class MemoryStorage implements Storage {
|
|||
this.map.clear();
|
||||
}
|
||||
getItem(key: string): string | null {
|
||||
return this.map.has(key) ? (this.map.get(key) as string) : null;
|
||||
return this.map.get(key) ?? null;
|
||||
}
|
||||
key(index: number): string | null {
|
||||
return [...this.map.keys()][index] ?? null;
|
||||
|
|
@ -25,7 +25,7 @@ class MemoryStorage implements Storage {
|
|||
this.map.delete(key);
|
||||
}
|
||||
setItem(key: string, value: string): void {
|
||||
this.map.set(key, String(value));
|
||||
this.map.set(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue