mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Incorporate markdownlint-rule-extended-ascii into tests, linting, and documentation.
This commit is contained in:
parent
4a1b3550d3
commit
22f1f064fd
5 changed files with 54 additions and 15 deletions
|
|
@ -73,16 +73,18 @@ test("simplePromise", (t) => {
|
|||
});
|
||||
});
|
||||
|
||||
const projectFiles = [
|
||||
"*.md",
|
||||
"doc/*.md",
|
||||
"helpers/*.md",
|
||||
"micromark/*.md",
|
||||
"schema/*.md"
|
||||
];
|
||||
|
||||
test("projectFiles", (t) => {
|
||||
t.plan(2);
|
||||
return import("globby")
|
||||
.then((module) => module.globby([
|
||||
"*.md",
|
||||
"doc/*.md",
|
||||
"helpers/*.md",
|
||||
"micromark/*.md",
|
||||
"schema/*.md"
|
||||
]))
|
||||
.then((module) => module.globby(projectFiles))
|
||||
.then((files) => {
|
||||
t.is(files.length, 60);
|
||||
const options = {
|
||||
|
|
@ -100,6 +102,34 @@ test("projectFiles", (t) => {
|
|||
});
|
||||
});
|
||||
|
||||
test("projectFilesExtendedAscii", (t) => {
|
||||
t.plan(2);
|
||||
return import("globby")
|
||||
.then((module) => module.globby([
|
||||
...projectFiles,
|
||||
"!doc/Rules.md",
|
||||
"!doc/md010.md",
|
||||
"!doc/md026.md",
|
||||
"!doc/md036.md"
|
||||
]))
|
||||
.then((files) => {
|
||||
t.is(files.length, 56);
|
||||
const options = {
|
||||
files,
|
||||
"config": require("../.markdownlint.json"),
|
||||
"customRules": [ require("markdownlint-rule-extended-ascii") ]
|
||||
};
|
||||
// @ts-ignore
|
||||
return markdownlint.promises.markdownlint(options).then((actual) => {
|
||||
const expected = {};
|
||||
for (const file of files) {
|
||||
expected[file] = [];
|
||||
}
|
||||
t.deepEqual(actual, expected, "Issue(s) with project files.");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test("stringInputLineEndings", (t) => new Promise((resolve) => {
|
||||
t.plan(2);
|
||||
const options = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue