Skip to content

Commit

Permalink
chore: update glob devDep.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Apr 29, 2023
1 parent a304ab1 commit ec278a2
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 66 deletions.
120 changes: 60 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"eslint-config-canonical": "~33.0.1",
"eslint": "^8.39.0",
"gitdown": "^3.1.5",
"glob": "^8.1.0",
"glob": "^10.2.2",
"husky": "^8.0.3",
"jsdoc-type-pratt-parser": "^4.0.0",
"lint-staged": "^13.2.2",
Expand Down
12 changes: 7 additions & 5 deletions src/bin/generateDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import fs from 'fs';
import path from 'path';
import decamelize from 'decamelize';
import Gitdown from 'gitdown';
import glob from 'glob';
import {
glob,
} from 'glob';

const trimCode = (code) => {
let lines = code.replace(/^\n/u, '').trimEnd().split('\n');
Expand Down Expand Up @@ -47,10 +49,10 @@ const formatCodeSnippet = (setup, ruleName) => {
return paragraphs.join('\n');
};

const getAssertions = () => {
const assertionFiles = glob.sync(path.resolve(__dirname, '../../test/rules/assertions/*.js')).filter((file) => {
const getAssertions = async () => {
const assertionFiles = (await glob(path.resolve(__dirname, '../../test/rules/assertions/*.js'))).filter((file) => {
return !file.includes('flatConfig');
});
}).reverse();

const assertionNames = assertionFiles.map((filePath) => {
return path.basename(filePath, '.js');
Expand Down Expand Up @@ -116,7 +118,7 @@ const generateDocs = async () => {
const {
assertions,
assertionNames,
} = getAssertions();
} = await getAssertions();

const docContents = await Promise.all([
...assertionNames.map((assertionName) => {
Expand Down

0 comments on commit ec278a2

Please sign in to comment.