mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Replace glob
with globby
(allows multiple patterns and exclusions).
This commit is contained in:
parent
ebdf0ddf28
commit
0cea489e18
2 changed files with 6 additions and 14 deletions
|
@ -43,7 +43,6 @@
|
|||
"cpy-cli": "~3.1.0",
|
||||
"eslint": "~6.8.0",
|
||||
"eslint-plugin-jsdoc": "~22.1.0",
|
||||
"glob": "~7.1.6",
|
||||
"globby": "~11.0.0",
|
||||
"js-yaml": "~3.13.1",
|
||||
"make-dir-cli": "~2.0.0",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const glob = require("glob");
|
||||
const globby = require("globby");
|
||||
const tape = require("tape");
|
||||
require("tape-player");
|
||||
const markdownlint = require("../lib/markdownlint");
|
||||
|
@ -33,19 +33,12 @@ files.filter((file) => /\.md$/.test(file)).forEach((file) => {
|
|||
|
||||
// Parses all Markdown files in all package dependencies
|
||||
tape("parseAllFiles", (test) => {
|
||||
test.plan(2);
|
||||
const globOptions = {
|
||||
// "cwd": "/",
|
||||
"realpath": true
|
||||
test.plan(1);
|
||||
const options = {
|
||||
"files": globby.sync("**/*.{md,markdown}")
|
||||
};
|
||||
glob("**/*.{md,markdown}", globOptions, (err, matches) => {
|
||||
markdownlint(options, (err) => {
|
||||
test.ifError(err);
|
||||
const markdownlintOptions = {
|
||||
"files": matches
|
||||
};
|
||||
markdownlint(markdownlintOptions, (errr) => {
|
||||
test.ifError(errr);
|
||||
test.end();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue