mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 10:22:30 +02:00
refactor: remove a few Lodash usages & ESLint enforcement (#5807)
* refactor: remove some lodash usage Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * Enforce ESLint Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * More forbids * Fixup * Fix * Fix website
This commit is contained in:
parent
4b2152a964
commit
7a6607cfa1
12 changed files with 60 additions and 49 deletions
|
@ -40,7 +40,6 @@ import {
|
|||
Metadata,
|
||||
PagesContentPaths,
|
||||
} from './types';
|
||||
import {flatten} from 'lodash';
|
||||
|
||||
export function getContentPathList(contentPaths: PagesContentPaths): string[] {
|
||||
return [contentPaths.contentPathLocalized, contentPaths.contentPath];
|
||||
|
@ -86,10 +85,8 @@ export default function pluginContentPages(
|
|||
|
||||
getPathsToWatch() {
|
||||
const {include = []} = options;
|
||||
return flatten(
|
||||
getContentPathList(contentPaths).map((contentPath) => {
|
||||
return include.map((pattern) => `${contentPath}/${pattern}`);
|
||||
}),
|
||||
return getContentPathList(contentPaths).flatMap((contentPath) =>
|
||||
include.map((pattern) => `${contentPath}/${pattern}`),
|
||||
);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue