Make ESLint Happy

This commit is contained in:
SukkaW
2023-12-03 02:04:09 +08:00
parent 34ef0e58ff
commit d4ff4c5b2d
36 changed files with 136 additions and 140 deletions

View File

@@ -1,6 +1,6 @@
import tldts from 'tldts';
import * as tldts from 'tldts';
import { createCache } from './cache-apply';
import { PublicSuffixList } from 'gorhill-publicsuffixlist';
import type { PublicSuffixList } from 'gorhill-publicsuffixlist';
const cache = createCache('cached-tld-parse', true);
@@ -12,6 +12,6 @@ let gothillGetDomainCache: ReturnType<typeof createCache> | null = null;
export const createCachedGorhillGetDomain = (gorhill: PublicSuffixList) => {
return (domain: string) => {
gothillGetDomainCache ??= createCache('cached-gorhill-get-domain', true);
return gothillGetDomainCache.sync(domain, () => gorhill.getDomain(domain[0] === '.' ? domain.slice(1) : domain))
return gothillGetDomainCache.sync(domain, () => gorhill.getDomain(domain[0] === '.' ? domain.slice(1) : domain));
};
};