mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-12 15:52:39 +02:00
chore: fix ESLint warnings, restrict export all syntax (#6605)
* chore: fix ESLint warnings, forbid export all syntax * fix... * reorder
This commit is contained in:
parent
3fd99ad8d4
commit
45f6f8b869
22 changed files with 220 additions and 148 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
import {Props as Tweet} from '../../components/Tweet';
|
||||
import type {Props as Tweet} from '../../components/Tweet';
|
||||
|
||||
export interface TweetItem extends Tweet {
|
||||
showOnHomepage: boolean;
|
||||
|
|
|
@ -17,7 +17,7 @@ import Image from '@theme/IdealImage';
|
|||
import Layout from '@theme/Layout';
|
||||
|
||||
import Tweet from '@site/src/components/Tweet';
|
||||
import Tweets, {TweetItem} from '@site/src/data/tweets';
|
||||
import Tweets, {type TweetItem} from '@site/src/data/tweets';
|
||||
|
||||
import clsx from 'clsx';
|
||||
|
||||
|
|
|
@ -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 &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue