Housekeeping & Make ESLint Happy

This commit is contained in:
SukkaW
2024-06-24 19:22:33 +08:00
parent 671f267dff
commit a5829cc6bd
7 changed files with 20 additions and 20 deletions

View File

@@ -190,7 +190,7 @@ export const buildSpeedtestDomainSet = task(import.meta.main, import.meta.path)(
.then(setAddFromArrayCurried(domains))
);
await new Promise<void>((resolve) => {
await new Promise<void>((resolve, reject) => {
const pMap = ([
'Hong Kong',
'Taiwan',
@@ -244,8 +244,8 @@ export const buildSpeedtestDomainSet = task(import.meta.main, import.meta.path)(
Promise.all(Object.values(pMap)).then(() => {
clearTimeout(timer);
resolve();
});
return resolve();
}).catch(() => reject);
});
const deduped = span.traceChildSync('sort result', () => sortDomains(domainDeduper(Array.from(domains))));

View File

@@ -35,14 +35,12 @@ import { getGorhillPublicSuffixPromise } from './get-gorhill-publicsuffix';
bench('tldts', () => {
for (let i = 0, len = data.length; i < len; i++) {
// eslint-disable-next-line import-x/namespace -- safe
tldts[methodName](data[i], tldtsOpt);
}
});
bench('tldts-experimental', () => {
for (let i = 0, len = data.length; i < len; i++) {
// eslint-disable-next-line import-x/namespace -- safe
tldtsExperimental[methodName](data[i], tldtsOpt);
}
});

View File

@@ -61,9 +61,9 @@ export const parseDomesticList = async () => {
}
};
await Promise.all([
runAgainstRuleset(path.resolve(import.meta.dir, '../List/non_ip/domestic.conf'))
]);
// await Promise.all([
await runAgainstRuleset(path.resolve(import.meta.dir, '../List/non_ip/domestic.conf'));
// ]);
console.log(notIncludedDomestic.size, notIncludedDomestic);
};