File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ const linter = createLinter(lintDryRun, disableRule);
108108const { loadFiles } = createMarkdownLoader ( ) ;
109109const { parseApiDocs } = createMarkdownParser ( ) ;
110110
111- const apiDocFiles = loadFiles ( input , ignore ) ;
111+ const apiDocFiles = await loadFiles ( input , ignore ) ;
112112
113113const parsedApiDocs = await parseApiDocs ( apiDocFiles ) ;
114114
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const createLoader = () => {
2222 *
2323 * @see https://code.visualstudio.com/docs/editor/glob-patterns
2424 */
25- const loadFiles = ( searchPath , ignorePath ) => {
25+ const loadFiles = async ( searchPath , ignorePath ) => {
2626 const ignoredFiles = ignorePath
2727 ? globSync ( ignorePath ) . filter ( filePath => extname ( filePath ) === '.md' )
2828 : [ ] ;
@@ -32,11 +32,13 @@ const createLoader = () => {
3232 extname ( filePath ) === '.md' && ! ignoredFiles . includes ( filePath )
3333 ) ;
3434
35- return resolvedFiles . map ( async filePath => {
36- const fileContents = await readFile ( filePath , 'utf-8' ) ;
35+ return Promise . all (
36+ resolvedFiles . map ( async filePath => {
37+ const fileContents = await readFile ( filePath , 'utf-8' ) ;
3738
38- return new VFile ( { path : filePath , value : fileContents } ) ;
39- } ) ;
39+ return new VFile ( { path : filePath , value : fileContents } ) ;
40+ } )
41+ ) ;
4042 } ;
4143
4244 return { loadFiles } ;
You can’t perform that action at this time.
0 commit comments