chore: fix ESLint warnings, restrict export all syntax (#6605)

* chore: fix ESLint warnings, forbid export all syntax

* fix...

* reorder
This commit is contained in:
Joshua Chen 2022-02-04 21:57:10 +08:00 committed by GitHub
parent 3fd99ad8d4
commit 45f6f8b869
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 220 additions and 148 deletions

View file

@ -55,7 +55,6 @@ async function syncAvatars(authorsMap, generateDir) {
*/
const lastUpdateCache = await fs.readJSON(lastUpdateCachePath);
let limitReached = false;
// eslint-disable-next-line no-restricted-syntax
for (const username of Object.keys(authorsMap)) {
if (!limitReached && !lastUpdateCache[username]) {
if (!(await fetchImage(username, lastUpdateCache, authorsMap))) {
@ -69,7 +68,6 @@ async function syncAvatars(authorsMap, generateDir) {
const usersByLastUpdate = Object.entries(lastUpdateCache)
.sort((a, b) => a[1] - b[1])
.map((a) => a[0]);
// eslint-disable-next-line no-restricted-syntax
for (const username of usersByLastUpdate) {
if (
!limitReached &&