Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnson committed Dec 12, 2024
1 parent d04c1ba commit e19f78c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions markdownlint-cli2.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import pathDefault from "node:path";
const pathPosix = pathDefault.posix;
import { pathToFileURL } from "node:url";
import { globby } from "globby";
import micromatch from "micromatch";
import { applyFixes, getVersion } from "markdownlint";
import { lint, extendConfig, readConfig } from "markdownlint/promise";
import { expandTildePath } from "markdownlint/helpers";
Expand Down Expand Up @@ -197,13 +198,12 @@ const readOptionsOrConfig = async (configPath, fs, noRequire) => {
};

// Filter a list of files to ignore by glob
const removeIgnoredFiles = (dir, files, ignores) => {
const micromatch = dynamicRequire("micromatch");
return micromatch(
const removeIgnoredFiles = (dir, files, ignores) => (
micromatch(
files.map((file) => pathPosix.relative(dir, file)),
ignores
).map((file) => pathPosix.join(dir, file));
};
).map((file) => pathPosix.join(dir, file))
);

// Process/normalize command-line arguments and return glob patterns
const processArgv = (argv) => {
Expand Down

0 comments on commit e19f78c

Please sign in to comment.