diff --git a/README.md b/README.md index 69afa8c8..22623f7e 100644 --- a/README.md +++ b/README.md @@ -1058,7 +1058,6 @@ following projects or one of the tools in the [Related section](#related): - [Garden React Components][garden] ([Search repository][garden-search]) - [MDN Web Docs][mdn] ([Search repository][mdn-search]) - [MkDocs][mkdocs] ([Search repository][mkdocs-search]) -- [Mocha][mocha] ([Search repository][mocha-search]) - [Pi-hole documentation][pi-hole] ([Search repository][pi-hole-search]) - [Reactable][reactable] ([Search repository][reactable-search]) - [V8][v8] ([Search repository][v8-search]) @@ -1091,8 +1090,6 @@ For more advanced integration scenarios: [mdn-search]: https://github.com/mdn/content/search?q=markdownlint [mkdocs]: https://www.mkdocs.org/ [mkdocs-search]: https://github.com/mkdocs/mkdocs/search?q=markdownlint -[mocha]: https://mochajs.org/ -[mocha-search]: https://github.com/mochajs/mocha/search?q=markdownlint [pi-hole]: https://docs.pi-hole.net [pi-hole-search]: https://github.com/pi-hole/docs/search?q=markdownlint [reactable]: https://glittershark.github.io/reactable/ diff --git a/test/markdownlint-test-repos-small.mjs b/test/markdownlint-test-repos-small.mjs index 541654ef..0882177c 100644 --- a/test/markdownlint-test-repos-small.mjs +++ b/test/markdownlint-test-repos-small.mjs @@ -50,24 +50,6 @@ test("https://github.com/mkdocs/mkdocs", (t) => { return lintTestRepo(t, globPatterns, configPath); }); -test("https://github.com/mochajs/mocha", (t) => { - const rootDir = "./test-repos/mochajs-mocha"; - const globPatterns = [ - join(rootDir, "*.md"), - join(rootDir, "docs/**/*.md"), - join(rootDir, ".github/*.md"), - join(rootDir, "lib/**/*.md"), - join(rootDir, "test/**/*.md"), - join(rootDir, "example/**/*.md"), - ...excludeGlobs( - rootDir, - "CHANGELOG.md" - ) - ]; - const configPath = join(rootDir, ".markdownlint.json"); - return lintTestRepo(t, globPatterns, configPath); -}); - test("https://github.com/pi-hole/docs", (t) => { const rootDir = "./test-repos/pi-hole-docs"; const globPatterns = [ join(rootDir, "**/*.md") ]; diff --git a/test/markdownlint-test-repos.mjs b/test/markdownlint-test-repos.mjs index 13b54c20..c29ce938 100644 --- a/test/markdownlint-test-repos.mjs +++ b/test/markdownlint-test-repos.mjs @@ -16,7 +16,7 @@ import { markdownlintParallel } from "./markdownlint-test-parallel.mjs"; * * @param {import("ava").ExecutionContext} t Test instance. * @param {string[]} globPatterns Array of files to in/exclude. - * @param {string} configPath Path to config file. + * @param {string} [configPath] Path to config file. * @param {Configuration} [configOverrides] Configuration overrides. * @param {boolean} [parallel] True to lint in parallel. * @returns {Promise} Test result. @@ -30,9 +30,8 @@ export function lintTestRepo(t, globPatterns, configPath, configOverrides, paral const yamlParse = (/** @type {string} */ yaml) => jsYaml.load(yaml); return Promise.all([ globby(globPatterns), - readConfig(configPath, [ jsoncParse, yamlParse ]) - ]).then((globbyAndReadConfigResults) => { - const [ files, rawConfig ] = globbyAndReadConfigResults; + configPath ? readConfig(configPath, [ jsoncParse, yamlParse ]) : {} + ]).then(([ files, rawConfig ]) => { // eslint-disable-next-line no-console console.log(`${t.title}: Linting ${files.length} files...`); const cookedConfig = Object.fromEntries( diff --git a/test/snapshots/markdownlint-test-repos-small.mjs.md b/test/snapshots/markdownlint-test-repos-small.mjs.md index 6b8eeed9..e45f3b99 100644 --- a/test/snapshots/markdownlint-test-repos-small.mjs.md +++ b/test/snapshots/markdownlint-test-repos-small.mjs.md @@ -337,12 +337,6 @@ Generated by [AVA](https://avajs.dev). ## https://github.com/mkdocs/mkdocs -> Expected linting violations - - '' - -## https://github.com/mochajs/mocha - > Expected linting violations '' diff --git a/test/snapshots/markdownlint-test-repos-small.mjs.snap b/test/snapshots/markdownlint-test-repos-small.mjs.snap index dff51f4e..90a21ea9 100644 Binary files a/test/snapshots/markdownlint-test-repos-small.mjs.snap and b/test/snapshots/markdownlint-test-repos-small.mjs.snap differ