Skip to content

Commit ec278a2

Browse files
committed
chore: update glob devDep.
1 parent a304ab1 commit ec278a2

File tree

3 files changed

+68
-66
lines changed

3 files changed

+68
-66
lines changed

package-lock.json

+60-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"eslint-config-canonical": "~33.0.1",
4040
"eslint": "^8.39.0",
4141
"gitdown": "^3.1.5",
42-
"glob": "^8.1.0",
42+
"glob": "^10.2.2",
4343
"husky": "^8.0.3",
4444
"jsdoc-type-pratt-parser": "^4.0.0",
4545
"lint-staged": "^13.2.2",

src/bin/generateDocs.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import fs from 'fs';
55
import path from 'path';
66
import decamelize from 'decamelize';
77
import Gitdown from 'gitdown';
8-
import glob from 'glob';
8+
import {
9+
glob,
10+
} from 'glob';
911

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

50-
const getAssertions = () => {
51-
const assertionFiles = glob.sync(path.resolve(__dirname, '../../test/rules/assertions/*.js')).filter((file) => {
52+
const getAssertions = async () => {
53+
const assertionFiles = (await glob(path.resolve(__dirname, '../../test/rules/assertions/*.js'))).filter((file) => {
5254
return !file.includes('flatConfig');
53-
});
55+
}).reverse();
5456

5557
const assertionNames = assertionFiles.map((filePath) => {
5658
return path.basename(filePath, '.js');
@@ -116,7 +118,7 @@ const generateDocs = async () => {
116118
const {
117119
assertions,
118120
assertionNames,
119-
} = getAssertions();
121+
} = await getAssertions();
120122

121123
const docContents = await Promise.all([
122124
...assertionNames.map((assertionName) => {

0 commit comments

Comments
 (0)