diff --git a/CHANGELOG.md b/CHANGELOG.md index f307dc1c..df8d6869 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.17.2 + +- Update dependencies (including `markdownlint`) + ## 0.17.1 - Update dependencies (including `markdownlint`) diff --git a/README.md b/README.md index 9dc51c63..4207587e 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ A container image [`davidanson/markdownlint-cli2`][docker-hub-markdownlint-cli2] can also be used (e.g., as part of a CI pipeline): ```bash -docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.17.1 "**/*.md" "#node_modules" +docker run -v $PWD:/workdir davidanson/markdownlint-cli2:v0.17.2 "**/*.md" "#node_modules" ``` Notes: @@ -166,7 +166,7 @@ Notes: - A custom working directory can be specified with Docker's `-w` flag: ```bash - docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.17.1 "**/*.md" "#node_modules" + docker run -w /myfolder -v $PWD:/myfolder davidanson/markdownlint-cli2:v0.17.2 "**/*.md" "#node_modules" ``` For convenience, the container image @@ -413,7 +413,7 @@ reference to the `repos` list in that project's `.pre-commit-config.yaml` like: ```yaml - repo: https://github.com/DavidAnson/markdownlint-cli2 - rev: v0.17.1 + rev: v0.17.2 hooks: - id: markdownlint-cli2 ``` diff --git a/doc/OutputFormatters.md b/doc/OutputFormatters.md index d7ffcd2c..b562b164 100644 --- a/doc/OutputFormatters.md +++ b/doc/OutputFormatters.md @@ -63,4 +63,4 @@ For a `.markdownlint-cli2.jsonc` like: [formatter-junit]: ../formatter-junit/markdownlint-cli2-formatter-junit.js [formatter-sarif]: ../formatter-sarif/markdownlint-cli2-formatter-sarif.js [markdownlint-cli2-formatter]: https://www.npmjs.com/search?q=keywords:markdownlint-cli2-formatter -[markdownlint-d-ts]: https://github.com/DavidAnson/markdownlint/blob/v0.37.3/lib/markdownlint.d.mts +[markdownlint-d-ts]: https://github.com/DavidAnson/markdownlint/blob/v0.37.4/lib/markdownlint.d.mts diff --git a/markdownlint-cli2.mjs b/markdownlint-cli2.mjs index 6e287bea..abb11751 100755 --- a/markdownlint-cli2.mjs +++ b/markdownlint-cli2.mjs @@ -2,27 +2,24 @@ // Imports import fsNode from "node:fs"; -import { createRequire } from "node:module"; -const dynamicRequire = createRequire(import.meta.url); import os from "node:os"; 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 { applyFixes, getVersion, resolveModule } from "markdownlint"; import { lint, extendConfig, readConfig } from "markdownlint/promise"; import { expandTildePath } from "markdownlint/helpers"; import appendToArray from "./append-to-array.mjs"; import mergeOptions from "./merge-options.mjs"; -import resolveModule from "./resolve-module.mjs"; import parsers from "./parsers/parsers.mjs"; import jsoncParse from "./parsers/jsonc-parse.mjs"; import yamlParse from "./parsers/yaml-parse.mjs"; // Variables const packageName = "markdownlint-cli2"; -const packageVersion = "0.17.1"; +const packageVersion = "0.17.2"; const libraryName = "markdownlint"; const libraryVersion = getVersion(); const bannerMessage = `${packageName} v${packageVersion} (${libraryName} v${libraryVersion})`; @@ -78,7 +75,7 @@ const importModule = async (dirOrDirs, id, noImport) => { let moduleName = null; try { try { - moduleName = pathToFileURL(resolveModule(dynamicRequire, expandId, dirs)); + moduleName = pathToFileURL(resolveModule(expandId, dirs)); } catch (error) { errors.push(error); moduleName = diff --git a/package.json b/package.json index 65a9ac18..addf41fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "markdownlint-cli2", - "version": "0.17.1", + "version": "0.17.2", "description": "A fast, flexible, configuration-based command-line interface for linting Markdown/CommonMark files with the `markdownlint` library", "author": { "name": "David Anson", @@ -39,7 +39,7 @@ "playwright-test": "playwright test --config ./webworker/playwright.config.mjs", "playwright-test-docker": "docker run --rm --volume $PWD:/home/workdir --workdir /home/workdir --ipc=host mcr.microsoft.com/playwright:v1.49.1 npm run playwright-test", "schema": "cpy ./node_modules/markdownlint/schema/markdownlint-config-schema.json ./schema --flat", - "test": "ava --timeout=1m test/append-to-array-test.mjs test/fs-mock-test.mjs test/fs-virtual-test.mjs test/markdownlint-cli2-test.mjs test/markdownlint-cli2-test-exec.mjs test/markdownlint-cli2-test-exports.mjs test/markdownlint-cli2-test-fs.mjs test/markdownlint-cli2-test-main.mjs test/merge-options-test.mjs test/resolve-module-test.mjs", + "test": "ava --timeout=1m test/append-to-array-test.mjs test/fs-mock-test.mjs test/fs-virtual-test.mjs test/markdownlint-cli2-test.mjs test/markdownlint-cli2-test-exec.mjs test/markdownlint-cli2-test-exports.mjs test/markdownlint-cli2-test-fs.mjs test/markdownlint-cli2-test-main.mjs test/merge-options-test.mjs", "test-cover": "c8 --100 npm test", "test-docker-hub-image": "VERSION=$(node -e \"process.stdout.write(require('./package.json').version)\") && docker image rm davidanson/markdownlint-cli2:v$VERSION davidanson/markdownlint-cli2:latest || true && docker run --rm -v $PWD:/workdir davidanson/markdownlint-cli2:v$VERSION \"*.md\" && docker run --rm -v $PWD:/workdir davidanson/markdownlint-cli2:latest \"*.md\"", "test-docker-hub-image-rules": "VERSION=$(node -e \"process.stdout.write(require('./package.json').version)\") && docker image rm davidanson/markdownlint-cli2-rules:v$VERSION davidanson/markdownlint-cli2-rules:latest || true && docker run --rm -v $PWD:/workdir davidanson/markdownlint-cli2-rules:v$VERSION \"*.md\" && docker run --rm -v $PWD:/workdir davidanson/markdownlint-cli2-rules:latest \"*.md\"", @@ -68,7 +68,6 @@ "parsers/jsonc-parse.mjs", "parsers/yaml-parse.mjs", "README.md", - "resolve-module.mjs", "schema/markdownlint-cli2-config-schema.json", "schema/markdownlint-config-schema.json", "schema/ValidatingConfiguration.md" @@ -77,23 +76,21 @@ "globby": "14.0.2", "js-yaml": "4.1.0", "jsonc-parser": "3.3.1", - "markdownlint": "0.37.3", + "markdownlint": "0.37.4", "markdownlint-cli2-formatter-default": "0.0.5", "micromatch": "4.0.8" }, "devDependencies": { - "@eslint/js": "9.17.0", - "@iktakahiro/markdown-it-katex": "4.0.1", + "@eslint/js": "9.18.0", "@playwright/test": "1.49.1", - "@stylistic/eslint-plugin": "2.12.1", + "@stylistic/eslint-plugin": "2.13.0", "ajv": "8.17.1", "ava": "6.2.0", "c8": "10.1.3", "chalk": "5.4.1", "cpy": "11.1.0", "cpy-cli": "5.0.0", - "del": "8.0.0", - "eslint": "9.17.0", + "eslint": "9.18.0", "eslint-plugin-jsdoc": "50.6.1", "eslint-plugin-n": "17.15.1", "eslint-plugin-unicorn": "56.0.1", diff --git a/resolve-module.mjs b/resolve-module.mjs deleted file mode 100644 index 13c87ac5..00000000 --- a/resolve-module.mjs +++ /dev/null @@ -1,16 +0,0 @@ -// @ts-check - -/** - * Wrapper for calling Node's require.resolve with additional paths. - * @param {object} require Node's require implementation (or equivalent). - * @param {string} request Module path to require. - * @param {string[]} paths Paths to resolve module location from. - * @returns {string} Resolved file name. - */ -const resolveModule = (require, request, paths) => { - const resolvePaths = require.resolve.paths ? require.resolve.paths("") : []; - const allPaths = [ ...paths, ...resolvePaths ]; - return require.resolve(request, { "paths": allPaths }); -}; - -export default resolveModule; diff --git a/schema/markdownlint-cli2-config-schema.json b/schema/markdownlint-cli2-config-schema.json index 20e3c3b9..84525778 100644 --- a/schema/markdownlint-cli2-config-schema.json +++ b/schema/markdownlint-cli2-config-schema.json @@ -1,21 +1,21 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.17.1/schema/markdownlint-cli2-config-schema.json", + "$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.17.2/schema/markdownlint-cli2-config-schema.json", "title": "markdownlint-cli2 configuration schema", "type": "object", "properties": { "$schema": { "description": "JSON Schema URI (expected by some editors)", "type": "string", - "default": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.17.1/schema/markdownlint-cli2-config-schema.json" + "default": "https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/v0.17.2/schema/markdownlint-cli2-config-schema.json" }, "config": { - "description": "markdownlint configuration schema : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/schema/.markdownlint.jsonc", - "$ref": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.3/schema/markdownlint-config-schema.json", + "description": "markdownlint configuration schema : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/schema/.markdownlint.jsonc", + "$ref": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.4/schema/markdownlint-config-schema.json", "default": {} }, "customRules": { - "description": "Module names or paths of custom rules to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Module names or paths of custom rules to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "array", "default": [], "items": { @@ -25,18 +25,18 @@ } }, "fix": { - "description": "Whether to enable fixing of linting errors reported by rules that emit fix information : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Whether to enable fixing of linting errors reported by rules that emit fix information : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "boolean", "default": false }, "frontMatter": { - "description": "Regular expression used to match and ignore any front matter at the beginning of a document : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Regular expression used to match and ignore any front matter at the beginning of a document : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "string", "minLength": 1, "default": "" }, "gitignore": { - "description": "Whether to ignore files referenced by .gitignore (or glob expression) (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Whether to ignore files referenced by .gitignore (or glob expression) (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": [ "boolean", "string" @@ -44,7 +44,7 @@ "default": false }, "globs": { - "description": "Glob expressions to include when linting (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Glob expressions to include when linting (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "array", "default": [], "items": { @@ -54,7 +54,7 @@ } }, "ignores": { - "description": "Glob expressions to ignore when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Glob expressions to ignore when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "array", "default": [], "items": { @@ -64,7 +64,7 @@ } }, "markdownItPlugins": { - "description": "markdown-it plugins to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "markdown-it plugins to load and use when linting : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "array", "default": [], "items": { @@ -84,7 +84,7 @@ } }, "modulePaths": { - "description": "Additional paths to resolve module locations from : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Additional paths to resolve module locations from : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "array", "default": [], "items": { @@ -94,22 +94,22 @@ } }, "noBanner": { - "description": "Whether to disable the display of the banner message and version numbers on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Whether to disable the display of the banner message and version numbers on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "boolean", "default": false }, "noInlineConfig": { - "description": "Whether to disable support of HTML comments within Markdown content : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Whether to disable support of HTML comments within Markdown content : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "boolean", "default": false }, "noProgress": { - "description": "Whether to disable the display of progress on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Whether to disable the display of progress on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "boolean", "default": false }, "outputFormatters": { - "description": "Output formatters to load and use to customize markdownlint-cli2 output (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Output formatters to load and use to customize markdownlint-cli2 output (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "array", "default": [], "items": { @@ -129,7 +129,7 @@ } }, "showFound": { - "description": "Whether to show the list of found files on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.1/README.md#markdownlint-cli2jsonc", + "description": "Whether to show the list of found files on stdout (only valid at the root) : https://github.com/DavidAnson/markdownlint-cli2/blob/v0.17.2/README.md#markdownlint-cli2jsonc", "type": "boolean", "default": false } diff --git a/schema/markdownlint-config-schema.json b/schema/markdownlint-config-schema.json index 7b4723d6..58005e01 100644 --- a/schema/markdownlint-config-schema.json +++ b/schema/markdownlint-config-schema.json @@ -1,13 +1,13 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.3/schema/markdownlint-config-schema.json", + "$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.4/schema/markdownlint-config-schema.json", "title": "markdownlint configuration schema", "type": "object", "properties": { "$schema": { "description": "JSON Schema URI (expected by some editors)", "type": "string", - "default": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.3/schema/markdownlint-config-schema.json" + "default": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.4/schema/markdownlint-config-schema.json" }, "default": { "description": "Default state for all rules", @@ -23,17 +23,17 @@ "default": null }, "MD001": { - "description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md001.md", + "description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md", "type": "boolean", "default": true }, "heading-increment": { - "description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md001.md", + "description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md", "type": "boolean", "default": true }, "MD003": { - "description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md003.md", + "description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md", "type": [ "boolean", "object" @@ -57,7 +57,7 @@ "additionalProperties": false }, "heading-style": { - "description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md003.md", + "description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md", "type": [ "boolean", "object" @@ -81,7 +81,7 @@ "additionalProperties": false }, "MD004": { - "description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md004.md", + "description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md", "type": [ "boolean", "object" @@ -104,7 +104,7 @@ "additionalProperties": false }, "ul-style": { - "description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md004.md", + "description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md", "type": [ "boolean", "object" @@ -127,17 +127,17 @@ "additionalProperties": false }, "MD005": { - "description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md005.md", + "description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md", "type": "boolean", "default": true }, "list-indent": { - "description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md005.md", + "description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md", "type": "boolean", "default": true }, "MD007": { - "description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md007.md", + "description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md", "type": [ "boolean", "object" @@ -165,7 +165,7 @@ "additionalProperties": false }, "ul-indent": { - "description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md007.md", + "description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md", "type": [ "boolean", "object" @@ -193,7 +193,7 @@ "additionalProperties": false }, "MD009": { - "description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md009.md", + "description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md", "type": [ "boolean", "object" @@ -220,7 +220,7 @@ "additionalProperties": false }, "no-trailing-spaces": { - "description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md009.md", + "description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md", "type": [ "boolean", "object" @@ -247,7 +247,7 @@ "additionalProperties": false }, "MD010": { - "description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md010.md", + "description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md", "type": [ "boolean", "object" @@ -277,7 +277,7 @@ "additionalProperties": false }, "no-hard-tabs": { - "description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md010.md", + "description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md", "type": [ "boolean", "object" @@ -307,17 +307,17 @@ "additionalProperties": false }, "MD011": { - "description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md011.md", + "description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md", "type": "boolean", "default": true }, "no-reversed-links": { - "description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md011.md", + "description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md", "type": "boolean", "default": true }, "MD012": { - "description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md012.md", + "description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md", "type": [ "boolean", "object" @@ -334,7 +334,7 @@ "additionalProperties": false }, "no-multiple-blanks": { - "description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md012.md", + "description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md", "type": [ "boolean", "object" @@ -351,7 +351,7 @@ "additionalProperties": false }, "MD013": { - "description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md013.md", + "description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md", "type": [ "boolean", "object" @@ -405,7 +405,7 @@ "additionalProperties": false }, "line-length": { - "description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md013.md", + "description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md", "type": [ "boolean", "object" @@ -459,57 +459,57 @@ "additionalProperties": false }, "MD014": { - "description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md014.md", + "description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md", "type": "boolean", "default": true }, "commands-show-output": { - "description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md014.md", + "description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md", "type": "boolean", "default": true }, "MD018": { - "description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md018.md", + "description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md", "type": "boolean", "default": true }, "no-missing-space-atx": { - "description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md018.md", + "description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md", "type": "boolean", "default": true }, "MD019": { - "description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md019.md", + "description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md", "type": "boolean", "default": true }, "no-multiple-space-atx": { - "description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md019.md", + "description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md", "type": "boolean", "default": true }, "MD020": { - "description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md020.md", + "description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md", "type": "boolean", "default": true }, "no-missing-space-closed-atx": { - "description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md020.md", + "description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md", "type": "boolean", "default": true }, "MD021": { - "description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md021.md", + "description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md", "type": "boolean", "default": true }, "no-multiple-space-closed-atx": { - "description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md021.md", + "description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md", "type": "boolean", "default": true }, "MD022": { - "description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md022.md", + "description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md", "type": [ "boolean", "object" @@ -544,7 +544,7 @@ "additionalProperties": false }, "blanks-around-headings": { - "description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md022.md", + "description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md", "type": [ "boolean", "object" @@ -579,17 +579,17 @@ "additionalProperties": false }, "MD023": { - "description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md023.md", + "description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md", "type": "boolean", "default": true }, "heading-start-left": { - "description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md023.md", + "description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md", "type": "boolean", "default": true }, "MD024": { - "description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md024.md", + "description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md", "type": [ "boolean", "object" @@ -605,7 +605,7 @@ "additionalProperties": false }, "no-duplicate-heading": { - "description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md024.md", + "description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md", "type": [ "boolean", "object" @@ -621,7 +621,7 @@ "additionalProperties": false }, "MD025": { - "description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md025.md", + "description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md", "type": [ "boolean", "object" @@ -644,7 +644,7 @@ "additionalProperties": false }, "single-title": { - "description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md025.md", + "description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md", "type": [ "boolean", "object" @@ -667,7 +667,7 @@ "additionalProperties": false }, "single-h1": { - "description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md025.md", + "description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md", "type": [ "boolean", "object" @@ -690,7 +690,7 @@ "additionalProperties": false }, "MD026": { - "description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md026.md", + "description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md", "type": [ "boolean", "object" @@ -706,7 +706,7 @@ "additionalProperties": false }, "no-trailing-punctuation": { - "description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md026.md", + "description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md", "type": [ "boolean", "object" @@ -722,27 +722,27 @@ "additionalProperties": false }, "MD027": { - "description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md027.md", + "description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md", "type": "boolean", "default": true }, "no-multiple-space-blockquote": { - "description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md027.md", + "description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md", "type": "boolean", "default": true }, "MD028": { - "description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md028.md", + "description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md", "type": "boolean", "default": true }, "no-blanks-blockquote": { - "description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md028.md", + "description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md", "type": "boolean", "default": true }, "MD029": { - "description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md029.md", + "description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md", "type": [ "boolean", "object" @@ -764,7 +764,7 @@ "additionalProperties": false }, "ol-prefix": { - "description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md029.md", + "description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md", "type": [ "boolean", "object" @@ -786,7 +786,7 @@ "additionalProperties": false }, "MD030": { - "description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md030.md", + "description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md", "type": [ "boolean", "object" @@ -821,7 +821,7 @@ "additionalProperties": false }, "list-marker-space": { - "description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md030.md", + "description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md", "type": [ "boolean", "object" @@ -856,7 +856,7 @@ "additionalProperties": false }, "MD031": { - "description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md031.md", + "description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md", "type": [ "boolean", "object" @@ -872,7 +872,7 @@ "additionalProperties": false }, "blanks-around-fences": { - "description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md031.md", + "description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md", "type": [ "boolean", "object" @@ -888,17 +888,17 @@ "additionalProperties": false }, "MD032": { - "description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md032.md", + "description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md", "type": "boolean", "default": true }, "blanks-around-lists": { - "description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md032.md", + "description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md", "type": "boolean", "default": true }, "MD033": { - "description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md033.md", + "description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md", "type": [ "boolean", "object" @@ -917,7 +917,7 @@ "additionalProperties": false }, "no-inline-html": { - "description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md033.md", + "description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md", "type": [ "boolean", "object" @@ -936,17 +936,17 @@ "additionalProperties": false }, "MD034": { - "description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md034.md", + "description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md", "type": "boolean", "default": true }, "no-bare-urls": { - "description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md034.md", + "description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md", "type": "boolean", "default": true }, "MD035": { - "description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md035.md", + "description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md", "type": [ "boolean", "object" @@ -962,7 +962,7 @@ "additionalProperties": false }, "hr-style": { - "description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md035.md", + "description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md", "type": [ "boolean", "object" @@ -978,7 +978,7 @@ "additionalProperties": false }, "MD036": { - "description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md036.md", + "description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md", "type": [ "boolean", "object" @@ -994,7 +994,7 @@ "additionalProperties": false }, "no-emphasis-as-heading": { - "description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md036.md", + "description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md", "type": [ "boolean", "object" @@ -1010,37 +1010,37 @@ "additionalProperties": false }, "MD037": { - "description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md037.md", + "description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md", "type": "boolean", "default": true }, "no-space-in-emphasis": { - "description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md037.md", + "description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md", "type": "boolean", "default": true }, "MD038": { - "description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md038.md", + "description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md", "type": "boolean", "default": true }, "no-space-in-code": { - "description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md038.md", + "description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md", "type": "boolean", "default": true }, "MD039": { - "description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md039.md", + "description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md", "type": "boolean", "default": true }, "no-space-in-links": { - "description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md039.md", + "description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md", "type": "boolean", "default": true }, "MD040": { - "description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md040.md", + "description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md", "type": [ "boolean", "object" @@ -1064,7 +1064,7 @@ "additionalProperties": false }, "fenced-code-language": { - "description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md040.md", + "description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md", "type": [ "boolean", "object" @@ -1088,7 +1088,7 @@ "additionalProperties": false }, "MD041": { - "description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md041.md", + "description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md", "type": [ "boolean", "object" @@ -1111,7 +1111,7 @@ "additionalProperties": false }, "first-line-heading": { - "description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md041.md", + "description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md", "type": [ "boolean", "object" @@ -1134,7 +1134,7 @@ "additionalProperties": false }, "first-line-h1": { - "description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md041.md", + "description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md", "type": [ "boolean", "object" @@ -1157,17 +1157,17 @@ "additionalProperties": false }, "MD042": { - "description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md042.md", + "description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md", "type": "boolean", "default": true }, "no-empty-links": { - "description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md042.md", + "description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md", "type": "boolean", "default": true }, "MD043": { - "description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md043.md", + "description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md", "type": [ "boolean", "object" @@ -1192,7 +1192,7 @@ "additionalProperties": false }, "required-headings": { - "description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md043.md", + "description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md", "type": [ "boolean", "object" @@ -1217,7 +1217,7 @@ "additionalProperties": false }, "MD044": { - "description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md044.md", + "description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md", "type": [ "boolean", "object" @@ -1246,7 +1246,7 @@ "additionalProperties": false }, "proper-names": { - "description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md044.md", + "description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md", "type": [ "boolean", "object" @@ -1275,17 +1275,17 @@ "additionalProperties": false }, "MD045": { - "description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md045.md", + "description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md", "type": "boolean", "default": true }, "no-alt-text": { - "description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md045.md", + "description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md", "type": "boolean", "default": true }, "MD046": { - "description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md046.md", + "description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md", "type": [ "boolean", "object" @@ -1306,7 +1306,7 @@ "additionalProperties": false }, "code-block-style": { - "description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md046.md", + "description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md", "type": [ "boolean", "object" @@ -1327,17 +1327,17 @@ "additionalProperties": false }, "MD047": { - "description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md047.md", + "description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md", "type": "boolean", "default": true }, "single-trailing-newline": { - "description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md047.md", + "description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md", "type": "boolean", "default": true }, "MD048": { - "description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md048.md", + "description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md", "type": [ "boolean", "object" @@ -1358,7 +1358,7 @@ "additionalProperties": false }, "code-fence-style": { - "description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md048.md", + "description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md", "type": [ "boolean", "object" @@ -1379,7 +1379,7 @@ "additionalProperties": false }, "MD049": { - "description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md049.md", + "description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md", "type": [ "boolean", "object" @@ -1400,7 +1400,7 @@ "additionalProperties": false }, "emphasis-style": { - "description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md049.md", + "description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md", "type": [ "boolean", "object" @@ -1421,7 +1421,7 @@ "additionalProperties": false }, "MD050": { - "description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md050.md", + "description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md", "type": [ "boolean", "object" @@ -1442,7 +1442,7 @@ "additionalProperties": false }, "strong-style": { - "description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md050.md", + "description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md", "type": [ "boolean", "object" @@ -1463,7 +1463,7 @@ "additionalProperties": false }, "MD051": { - "description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md051.md", + "description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md", "type": [ "boolean", "object" @@ -1479,7 +1479,7 @@ "additionalProperties": false }, "link-fragments": { - "description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md051.md", + "description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md", "type": [ "boolean", "object" @@ -1495,7 +1495,7 @@ "additionalProperties": false }, "MD052": { - "description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md052.md", + "description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md", "type": [ "boolean", "object" @@ -1511,7 +1511,7 @@ "additionalProperties": false }, "reference-links-images": { - "description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md052.md", + "description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md", "type": [ "boolean", "object" @@ -1527,7 +1527,7 @@ "additionalProperties": false }, "MD053": { - "description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md053.md", + "description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md", "type": [ "boolean", "object" @@ -1548,7 +1548,7 @@ "additionalProperties": false }, "link-image-reference-definitions": { - "description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md053.md", + "description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md", "type": [ "boolean", "object" @@ -1569,7 +1569,7 @@ "additionalProperties": false }, "MD054": { - "description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md054.md", + "description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md", "type": [ "boolean", "object" @@ -1610,7 +1610,7 @@ "additionalProperties": false }, "link-image-style": { - "description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md054.md", + "description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md", "type": [ "boolean", "object" @@ -1651,7 +1651,7 @@ "additionalProperties": false }, "MD055": { - "description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md055.md", + "description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md", "type": [ "boolean", "object" @@ -1674,7 +1674,7 @@ "additionalProperties": false }, "table-pipe-style": { - "description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md055.md", + "description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md", "type": [ "boolean", "object" @@ -1697,22 +1697,22 @@ "additionalProperties": false }, "MD056": { - "description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md056.md", + "description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md", "type": "boolean", "default": true }, "table-column-count": { - "description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md056.md", + "description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md", "type": "boolean", "default": true }, "MD058": { - "description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md058.md", + "description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md", "type": "boolean", "default": true }, "blanks-around-tables": { - "description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.3/doc/md058.md", + "description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md", "type": "boolean", "default": true }, diff --git a/test/customRules/rules/every-n-lines.cjs b/test/customRules/rules/every-n-lines.cjs index 5c79f0ab..3b5d5466 100644 --- a/test/customRules/rules/every-n-lines.cjs +++ b/test/customRules/rules/every-n-lines.cjs @@ -2,22 +2,18 @@ "use strict"; -const { forEachLine, getLineMetadata } = require("markdownlint/helpers"); - +/** @type {import("markdownlint").Rule} */ module.exports = { "names": [ "every-n-lines" ], "description": "Rule that reports an error every N lines", "tags": [ "test" ], "function": (params, onError) => { const n = params.config.n || 2; - forEachLine(getLineMetadata(params), (line, lineIndex) => { - const lineNumber = lineIndex + 1; - if ((lineNumber % n) === 0) { - onError({ - "lineNumber": lineNumber, - "detail": "Line number " + lineNumber - }); - } - }); + for (let lineNumber = n; lineNumber <= params.lines.length; lineNumber += n) { + onError({ + lineNumber, + "detail": `Line number ${lineNumber}` + }); + } } }; diff --git a/test/customRules/rules/first-line.cjs b/test/customRules/rules/first-line.cjs index 6974d2fb..e566e9d4 100644 --- a/test/customRules/rules/first-line.cjs +++ b/test/customRules/rules/first-line.cjs @@ -2,6 +2,7 @@ "use strict"; +/** @type {import("markdownlint").Rule} */ module.exports = { "names": [ "first-line" ], "description": "Rule that reports an error for the first line", diff --git a/test/customRules/rules/second-line.cjs b/test/customRules/rules/second-line.cjs index 2b8541d5..c4c7bc65 100644 --- a/test/customRules/rules/second-line.cjs +++ b/test/customRules/rules/second-line.cjs @@ -2,6 +2,7 @@ "use strict"; +/** @type {import("markdownlint").Rule} */ module.exports = { "names": [ "second-line" ], "description": "Rule that reports an error for the second line", @@ -15,6 +16,7 @@ module.exports = { "lineNumber": 2 }); } + // @ts-ignore resolve(); }); } diff --git a/test/markdownItPlugins/custom-rule-assert-markdown-it-tokens.mjs b/test/markdownItPlugins/custom-rule-assert-markdown-it-tokens.mjs new file mode 100644 index 00000000..ae04897e --- /dev/null +++ b/test/markdownItPlugins/custom-rule-assert-markdown-it-tokens.mjs @@ -0,0 +1,38 @@ +// @ts-check + +import { deepEqual } from "node:assert"; +import { readFileSync } from "node:fs"; +import { resolve } from "node:path"; +import { __dirname } from "../esm-helpers.mjs"; + +/** @type {import("markdownlint").Rule} */ +export default { + "names": [ "assert-markdown-it-tokens" ], + "description": "Rule that asserts markdown-it tokens", + "tags": [ "test" ], + "parser": "markdownit", + "function": (params) => { + const file = resolve( + __dirname(import.meta), + params.config.file + ); + const actual = params.parsers.markdownit.tokens; + const expected = JSON.parse( + readFileSync( + file, + "utf8" + ) + ); + // Un-comment to update snapshots if markdown-it token output changes + // writeFileSync( + // file, + // JSON.stringify( + // actual, + // null, + // 2 + // ), + // "utf8" + // ); + deepEqual(actual, expected); + } +}; diff --git a/test/markdownItPlugins/file.json b/test/markdownItPlugins/file.json new file mode 100644 index 00000000..bb6e9c04 --- /dev/null +++ b/test/markdownItPlugins/file.json @@ -0,0 +1,204 @@ +[ + { + "type": "heading_open", + "tag": "h1", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 1, + "line": "# Heading" + } + ], + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "heading_close", + "tag": "h1", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 3 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Text", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://example.com" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "link", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + } + ], + "content": "Text [ link ](https://example.com)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 3 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } +] \ No newline at end of file diff --git a/test/markdownItPlugins/file/.markdownlint-cli2.jsonc b/test/markdownItPlugins/file/.markdownlint-cli2.jsonc index 404f1f07..d198a79c 100644 --- a/test/markdownItPlugins/file/.markdownlint-cli2.jsonc +++ b/test/markdownItPlugins/file/.markdownlint-cli2.jsonc @@ -1,4 +1,12 @@ { + "config": { + "assert-markdown-it-tokens": { + "file": "file.json" + } + }, + "customRules": [ + "../custom-rule-assert-markdown-it-tokens.mjs" + ], "markdownItPlugins": [ [ "./custom-markdown-it-plugin.cjs" ] ] diff --git a/test/markdownItPlugins/function.json b/test/markdownItPlugins/function.json new file mode 100644 index 00000000..bb6e9c04 --- /dev/null +++ b/test/markdownItPlugins/function.json @@ -0,0 +1,204 @@ +[ + { + "type": "heading_open", + "tag": "h1", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 1, + "line": "# Heading" + } + ], + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "heading_close", + "tag": "h1", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 3 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Text", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://example.com" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "link", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + } + ], + "content": "Text [ link ](https://example.com)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 3 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } +] \ No newline at end of file diff --git a/test/markdownItPlugins/function/.markdownlint-cli2.cjs b/test/markdownItPlugins/function/.markdownlint-cli2.cjs index cbda832a..153df5d4 100644 --- a/test/markdownItPlugins/function/.markdownlint-cli2.cjs +++ b/test/markdownItPlugins/function/.markdownlint-cli2.cjs @@ -3,6 +3,14 @@ "use strict"; module.exports = { + "config": { + "assert-markdown-it-tokens": { + "file": "function.json" + } + }, + "customRules": [ + "../custom-rule-assert-markdown-it-tokens.mjs" + ], "markdownItPlugins": [ [ "markdown-it-for-inline", diff --git a/test/markdownItPlugins/module.json b/test/markdownItPlugins/module.json new file mode 100644 index 00000000..bb6e9c04 --- /dev/null +++ b/test/markdownItPlugins/module.json @@ -0,0 +1,204 @@ +[ + { + "type": "heading_open", + "tag": "h1", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 1, + "line": "# Heading" + } + ], + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "heading_close", + "tag": "h1", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 3 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Text", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://example.com" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "link", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + } + ], + "content": "Text [ link ](https://example.com)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 3 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } +] \ No newline at end of file diff --git a/test/markdownItPlugins/module/.markdownlint-cli2.jsonc b/test/markdownItPlugins/module/.markdownlint-cli2.jsonc index 25dd953c..18b9b0f7 100644 --- a/test/markdownItPlugins/module/.markdownlint-cli2.jsonc +++ b/test/markdownItPlugins/module/.markdownlint-cli2.jsonc @@ -1,4 +1,12 @@ { + "config": { + "assert-markdown-it-tokens": { + "file": "module.json" + } + }, + "customRules": [ + "../custom-rule-assert-markdown-it-tokens.mjs" + ], "markdownItPlugins": [ [ "custom-markdown-it-plugin" ] ] diff --git a/test/markdownItPlugins/multiple.json b/test/markdownItPlugins/multiple.json new file mode 100644 index 00000000..415fab21 --- /dev/null +++ b/test/markdownItPlugins/multiple.json @@ -0,0 +1,367 @@ +[ + { + "type": "heading_open", + "tag": "h1", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 1, + "line": "# Heading" + } + ], + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "heading_close", + "tag": "h1", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Happy emoji: :smile:", + "lineNumber": 3 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Happy emoji:", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Happy emoji: :smile:" + }, + { + "type": "emoji", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "πŸ˜„", + "markup": "smile", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Happy emoji: :smile:" + } + ], + "content": "Happy emoji: :smile:", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Happy emoji: :smile:", + "lineNumber": 3 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 4, + 5 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Sad emoji: :frowning:", + "lineNumber": 5 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 4, + 5 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Sad emoji: :frowning:", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 5, + "line": "Sad emoji: :frowning:" + } + ], + "content": "Sad emoji: :frowning:", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Sad emoji: :frowning:", + "lineNumber": 5 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 7 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Text", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 7, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://example.com" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 7, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "link", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 7, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 7, + "line": "Text [ link ](https://example.com)" + } + ], + "content": "Text [ link ](https://example.com)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 7 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } +] \ No newline at end of file diff --git a/test/markdownItPlugins/multiple/.markdownlint-cli2.jsonc b/test/markdownItPlugins/multiple/.markdownlint-cli2.jsonc index 27bef5a6..69001533 100644 --- a/test/markdownItPlugins/multiple/.markdownlint-cli2.jsonc +++ b/test/markdownItPlugins/multiple/.markdownlint-cli2.jsonc @@ -1,5 +1,8 @@ { "config": { + "assert-markdown-it-tokens": { + "file": "multiple.json" + }, "proper-names": { "names": [ "SMILE", @@ -7,8 +10,11 @@ ] } }, + "customRules": [ + "../custom-rule-assert-markdown-it-tokens.mjs" + ], "markdownItPlugins": [ - [ "markdown-it-emoji/dist/bare.cjs.js", { "enabled": [ "smile" ] } ], - [ "@iktakahiro/markdown-it-katex" ] + [ "markdown-it-emoji/dist/light.cjs.js", { "enabled": [ "smile" ] } ], + [ "../file/custom-markdown-it-plugin.cjs" ] ] } diff --git a/test/markdownItPlugins/multiple/emoji.md b/test/markdownItPlugins/multiple/emoji.md index a6db2c4c..26604554 100644 --- a/test/markdownItPlugins/multiple/emoji.md +++ b/test/markdownItPlugins/multiple/emoji.md @@ -4,11 +4,5 @@ Happy emoji: :smile: Sad emoji: :frowning: -$1 *2* 3$ - -$$1 *2* 3$$ - -$$1 -+ 2 -+ 3$$ +Text [ link ](https://example.com) diff --git a/test/markdownItPlugins/pre-imported.json b/test/markdownItPlugins/pre-imported.json new file mode 100644 index 00000000..bb6e9c04 --- /dev/null +++ b/test/markdownItPlugins/pre-imported.json @@ -0,0 +1,204 @@ +[ + { + "type": "heading_open", + "tag": "h1", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 1, + "line": "# Heading" + } + ], + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "heading_close", + "tag": "h1", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 3 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Text", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://example.com" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": "link", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Text [ link ](https://example.com)" + } + ], + "content": "Text [ link ](https://example.com)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 3 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } +] \ No newline at end of file diff --git a/test/markdownItPlugins/pre-imported/.markdownlint-cli2.cjs b/test/markdownItPlugins/pre-imported/.markdownlint-cli2.cjs index fabb4a52..3ed67595 100644 --- a/test/markdownItPlugins/pre-imported/.markdownlint-cli2.cjs +++ b/test/markdownItPlugins/pre-imported/.markdownlint-cli2.cjs @@ -5,6 +5,14 @@ const markdownItForInline = require("markdown-it-for-inline"); module.exports = { + "config": { + "assert-markdown-it-tokens": { + "file": "pre-imported.json" + } + }, + "customRules": [ + "../custom-rule-assert-markdown-it-tokens.mjs" + ], "markdownItPlugins": [ [ markdownItForInline, diff --git a/test/markdownItPlugins/single.json b/test/markdownItPlugins/single.json new file mode 100644 index 00000000..94e13804 --- /dev/null +++ b/test/markdownItPlugins/single.json @@ -0,0 +1,384 @@ +[ + { + "type": "heading_open", + "tag": "h1", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 0, + 1 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 1, + "line": "# Heading" + } + ], + "content": "Heading", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "# Heading", + "lineNumber": 1 + }, + { + "type": "heading_close", + "tag": "h1", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "#", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Happy emoji: :smile:", + "lineNumber": 3 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 2, + 3 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Happy emoji: ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Happy emoji: :smile:" + }, + { + "type": "emoji", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "πŸ˜„", + "markup": "smile", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 3, + "line": "Happy emoji: :smile:" + } + ], + "content": "Happy emoji: :smile:", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Happy emoji: :smile:", + "lineNumber": 3 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 4, + 5 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Sad emoji: :frowning:", + "lineNumber": 5 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 4, + 5 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Sad emoji: ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 5, + "line": "Sad emoji: :frowning:" + }, + { + "type": "emoji", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "😦", + "markup": "frowning", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 5, + "line": "Sad emoji: :frowning:" + } + ], + "content": "Sad emoji: :frowning:", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Sad emoji: :frowning:", + "lineNumber": 5 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + }, + { + "type": "paragraph_open", + "tag": "p", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 7 + }, + { + "type": "inline", + "tag": "", + "attrs": null, + "map": [ + 6, + 7 + ], + "nesting": 0, + "level": 1, + "children": [ + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 0, + "children": null, + "content": "Text ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 7, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_open", + "tag": "a", + "attrs": [ + [ + "href", + "https://example.com" + ] + ], + "map": null, + "nesting": 1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 7, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "text", + "tag": "", + "attrs": null, + "map": null, + "nesting": 0, + "level": 1, + "children": null, + "content": " link ", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 7, + "line": "Text [ link ](https://example.com)" + }, + { + "type": "link_close", + "tag": "a", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": false, + "hidden": false, + "lineNumber": 7, + "line": "Text [ link ](https://example.com)" + } + ], + "content": "Text [ link ](https://example.com)", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false, + "line": "Text [ link ](https://example.com)", + "lineNumber": 7 + }, + { + "type": "paragraph_close", + "tag": "p", + "attrs": null, + "map": null, + "nesting": -1, + "level": 0, + "children": null, + "content": "", + "markup": "", + "info": "", + "meta": null, + "block": true, + "hidden": false + } +] \ No newline at end of file diff --git a/test/markdownItPlugins/single/.markdownlint-cli2.jsonc b/test/markdownItPlugins/single/.markdownlint-cli2.jsonc index 532a5d9d..7e1d66c7 100644 --- a/test/markdownItPlugins/single/.markdownlint-cli2.jsonc +++ b/test/markdownItPlugins/single/.markdownlint-cli2.jsonc @@ -1,5 +1,13 @@ { + "config": { + "assert-markdown-it-tokens": { + "file": "single.json" + } + }, + "customRules": [ + "../custom-rule-assert-markdown-it-tokens.mjs" + ], "markdownItPlugins": [ - [ "@iktakahiro/markdown-it-katex" ] + [ "markdown-it-emoji/dist/light.cjs.js" ] ] } diff --git a/test/markdownItPlugins/single/emoji.md b/test/markdownItPlugins/single/emoji.md index a6db2c4c..26604554 100644 --- a/test/markdownItPlugins/single/emoji.md +++ b/test/markdownItPlugins/single/emoji.md @@ -4,11 +4,5 @@ Happy emoji: :smile: Sad emoji: :frowning: -$1 *2* 3$ - -$$1 *2* 3$$ - -$$1 -+ 2 -+ 3$$ +Text [ link ](https://example.com) diff --git a/test/markdownlint-cli2-jsonc-example/.markdownlint-cli2.jsonc b/test/markdownlint-cli2-jsonc-example/.markdownlint-cli2.jsonc index 78c83ae9..579e8734 100644 --- a/test/markdownlint-cli2-jsonc-example/.markdownlint-cli2.jsonc +++ b/test/markdownlint-cli2-jsonc-example/.markdownlint-cli2.jsonc @@ -34,7 +34,7 @@ // Use a plugin to recognize math "markdownItPlugins": [ - [ "@iktakahiro/markdown-it-katex" ] + [ "markdown-it-emoji/dist/light.cjs.js" ] ], // Additional paths to resolve module locations from diff --git a/test/markdownlint-cli2-test-cases.mjs b/test/markdownlint-cli2-test-cases.mjs index cd0278fe..8aa68c45 100644 --- a/test/markdownlint-cli2-test-cases.mjs +++ b/test/markdownlint-cli2-test-cases.mjs @@ -4,6 +4,7 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import test from "ava"; +import cpy from "cpy"; import { __dirname } from "./esm-helpers.mjs"; const noop = () => null; @@ -140,16 +141,13 @@ const testCases = ({ const directoryName = (dir) => `${dir}-copy-${host}`; - const copyDirectory = (dir, alt) => import("cpy").then((cpy) => ( - cpy.default( - path.join(__dirname(import.meta), (alt || dir), "**"), - path.join(__dirname(import.meta), directoryName(dir)) - ) - )); + const copyDirectory = (dir, alt) => cpy( + path.join(__dirname(import.meta), (alt || dir), "**"), + path.join(__dirname(import.meta), directoryName(dir)) + ); - const deleteDirectory = (dir) => import("del").then((del) => ( - del.deleteAsync(path.join(__dirname(import.meta), directoryName(dir))) - )); + const deleteDirectory = (dir) => + fs.rm(path.join(__dirname(import.meta), directoryName(dir)), { "recursive": true }); testCase({ "name": "no-arguments", diff --git a/test/markdownlint-cli2-yaml-example/.markdownlint-cli2.yaml b/test/markdownlint-cli2-yaml-example/.markdownlint-cli2.yaml index bb9823df..f101fee1 100644 --- a/test/markdownlint-cli2-yaml-example/.markdownlint-cli2.yaml +++ b/test/markdownlint-cli2-yaml-example/.markdownlint-cli2.yaml @@ -31,7 +31,7 @@ ignores: # Use a plugin to recognize math markdownItPlugins: - - - "@iktakahiro/markdown-it-katex" + - "markdown-it-emoji/dist/light.cjs.js" # Additional paths to resolve module locations from modulePaths: diff --git a/test/resolve-module-test.mjs b/test/resolve-module-test.mjs deleted file mode 100644 index 2db0f549..00000000 --- a/test/resolve-module-test.mjs +++ /dev/null @@ -1,101 +0,0 @@ -// @ts-check - -import test from "ava"; -import path from "node:path"; -import { __dirname } from "./esm-helpers.mjs"; -import resolve from "../resolve-module.mjs"; - -import { createRequire } from "node:module"; -const require = createRequire(import.meta.url); - -test("built-in module", (t) => { - t.plan(1); - t.deepEqual( - require.resolve("node:fs"), - resolve(require, "node:fs", [ __dirname(import.meta) ]) - ); -}); - -test("locally-installed module", (t) => { - t.plan(1); - t.deepEqual( - require.resolve("micromatch"), - resolve(require, "micromatch", [ __dirname(import.meta) ]) - ); -}); - -test("relative (to __dirname(import.meta)) path to module", (t) => { - t.plan(1); - t.deepEqual( - require.resolve("./customRules/node_modules/markdownlint-rule-sample-commonjs"), - resolve( - require, - "./customRules/node_modules/markdownlint-rule-sample-commonjs", - [ __dirname(import.meta) ] - ) - ); -}); - -test("module in alternate node_modules", (t) => { - t.plan(2); - t.throws( - // @ts-ignore - () => require.resolve("markdownlint-rule-sample-commonjs"), - { "code": "MODULE_NOT_FOUND" } - ); - t.deepEqual( - require.resolve("./customRules/node_modules/markdownlint-rule-sample-commonjs"), - resolve( - require, - "markdownlint-rule-sample-commonjs", - [ path.join(__dirname(import.meta), "customRules") ] - ) - ); -}); - -test("module in alternate node_modules and no require.resolve.paths", (t) => { - t.plan(2); - // @ts-ignore - delete require.resolve.paths; - t.throws( - // @ts-ignore - () => require.resolve("markdownlint-rule-sample-commonjs"), - { "code": "MODULE_NOT_FOUND" } - ); - t.deepEqual( - require.resolve("./customRules/node_modules/markdownlint-rule-sample-commonjs"), - resolve( - require, - "markdownlint-rule-sample-commonjs", - [ path.join(__dirname(import.meta), "customRules") ] - ) - ); -}); - -test("module local, relative, and in alternate node_modules", (t) => { - t.plan(3); - const dirs = [ - __dirname(import.meta), - path.join(__dirname(import.meta), "customRules") - ]; - t.deepEqual( - require.resolve("micromatch"), - resolve(require, "micromatch", dirs) - ); - t.deepEqual( - require.resolve("./customRules/node_modules/markdownlint-rule-sample-commonjs"), - resolve( - require, - "./customRules/node_modules/markdownlint-rule-sample-commonjs", - dirs - ) - ); - t.deepEqual( - require.resolve("./customRules/node_modules/markdownlint-rule-sample-commonjs"), - resolve( - require, - "markdownlint-rule-sample-commonjs", - dirs - ) - ); -}); diff --git a/test/snapshots/markdownlint-cli2-test-exec.mjs.md b/test/snapshots/markdownlint-cli2-test-exec.mjs.md index 314fb669..11e45f5d 100644 --- a/test/snapshots/markdownlint-cli2-test-exec.mjs.md +++ b/test/snapshots/markdownlint-cli2-test-exec.mjs.md @@ -2691,12 +2691,13 @@ Generated by [AVA](https://avajs.dev). formatterJson: '', formatterJunit: '', formatterSarif: '', - stderr: `dir/about.md:1 every-n-lines Rule that reports an error every N lines [This rule threw an exception: getLineMetadata is not a function]␊ - dir/about.md:1 first-line Rule that reports an error for the first line␊ + stderr: `dir/about.md:1 first-line Rule that reports an error for the first line␊ dir/about.md:1:3 MD021/no-multiple-space-closed-atx Multiple spaces inside hashes on closed atx style heading [Context: "# About #"]␊ dir/about.md:1:10 MD021/no-multiple-space-closed-atx Multiple spaces inside hashes on closed atx style heading [Context: "# About #"]␊ + dir/about.md:3 every-n-lines Rule that reports an error every N lines [Line number 3]␊ dir/about.md:4 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "1. List"]␊ dir/about.md:5:1 MD029/ol-prefix Ordered list item prefix [Expected: 2; Actual: 3; Style: 1/2/3]␊ + dir/about.md:6 every-n-lines Rule that reports an error every N lines [Line number 6]␊ dir/subdir/hr.md:1:6 extended-ascii Only extended ASCII characters are allowed [Blocked character: 'βœ…']␊ dir/subdir/hr.md:1 first-line Rule that reports an error for the first line␊ dir/subdir/hr.md:3 sample-rule-commonjs Sample rule (commonjs) [Sample error for hr]␊ @@ -2712,34 +2713,37 @@ Generated by [AVA](https://avajs.dev). dir/subdir2/info.md:2:6 MD038/no-space-in-code Spaces inside code span elements [Context: "\` code1\`"]␊ dir/subdir2/info.md:2:20 MD038/no-space-in-code Spaces inside code span elements [Context: "\`code2 \`"]␊ dir/subdir2/info.md:4 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ - dir/subdir3/info.md:1 every-n-lines Rule that reports an error every N lines [This rule threw an exception: getLineMetadata is not a function]␊ dir/subdir3/info.md:1 first-line Rule that reports an error for the first line␊ dir/subdir3/info.md:1 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Information"]␊ dir/subdir3/info.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Information"]␊ dir/subdir3/info.md:2:6 MD038/no-space-in-code Spaces inside code span elements [Context: "\` code1\`"]␊ dir/subdir3/info.md:2:20 MD038/no-space-in-code Spaces inside code span elements [Context: "\`code2 \`"]␊ + dir/subdir3/info.md:3 every-n-lines Rule that reports an error every N lines [Line number 3]␊ dir/subdir3/info.md:4 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ dir2/hr.md:3 sample-rule-commonjs Sample rule (commonjs) [Sample error for hr]␊ dir2/hr.md:3 sample-rule-module Sample rule (module) [Sample error for hr]␊ - dir3/hr.md:1 every-n-lines Rule that reports an error every N lines [This rule threw an exception: getLineMetadata is not a function]␊ dir3/hr.md:1 first-line Rule that reports an error for the first line␊ dir3/hr.md:2 second-line Rule that reports an error for the second line␊ + dir3/hr.md:3 every-n-lines Rule that reports an error every N lines [Line number 3]␊ dir3/hr.md:3 sample-rule-commonjs Sample rule (commonjs) [Sample error for hr]␊ dir3/hr.md:3 sample-rule-module Sample rule (module) [Sample error for hr]␊ dir4/hr.md:3 sample-rule-commonjs Sample rule (commonjs) [Sample error for hr]␊ dir4/hr.md:3 sample-rule-module Sample rule (module) [Sample error for hr]␊ - viewme.md:1 every-n-lines Rule that reports an error every N lines [This rule threw an exception: getLineMetadata is not a function]␊ viewme.md:1 first-line Rule that reports an error for the first line␊ viewme.md:3 any-blockquote Rule that reports an error for any blockquote [Blockquote spans 1 line(s).] [Context: "> Tagli"]␊ + viewme.md:3 every-n-lines Rule that reports an error every N lines [Line number 3]␊ viewme.md:3:10 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]␊ viewme.md:5 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ + viewme.md:6 every-n-lines Rule that reports an error every N lines [Line number 6]␊ viewme.md:6 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Description"]␊ + viewme.md:9 every-n-lines Rule that reports an error every N lines [Line number 9]␊ + viewme.md:12 every-n-lines Rule that reports an error every N lines [Line number 12]␊ viewme.md:12:4 MD019/no-multiple-space-atx Multiple spaces after hash on atx style heading [Context: "## Summary"]␊ viewme.md:14:14 MD047/single-trailing-newline Files should end with a single newline character`, stdout: `markdownlint-cli2 vX.Y.Z (markdownlint vX.Y.Z)␊ Finding: **/*.md␊ Linting: 9 file(s)␊ - Summary: 45 error(s)`, + Summary: 49 error(s)`, } ## customRules-pre-imported (exec) @@ -2833,14 +2837,18 @@ Generated by [AVA](https://avajs.dev). module/link.md:3:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ multiple/emoji.md:3:15 MD044/proper-names Proper names should have the correct capitalization [Expected: SMILE; Actual: smile]␊ multiple/emoji.md:5:13 MD044/proper-names Proper names should have the correct capitalization [Expected: FROWNING; Actual: frowning]␊ - multiple/emoji.md:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ + multiple/emoji.md:7:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + multiple/emoji.md:7:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + multiple/emoji.md:9 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ pre-imported/link.md:3:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ pre-imported/link.md:3:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ - single/emoji.md:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]`, + single/emoji.md:7:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + single/emoji.md:7:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + single/emoji.md:9 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]`, stdout: `markdownlint-cli2 vX.Y.Z (markdownlint vX.Y.Z)␊ Finding: **/*.md␊ Linting: 6 file(s)␊ - Summary: 12 error(s)`, + Summary: 16 error(s)`, } ## markdownItPlugins-missing (exec) diff --git a/test/snapshots/markdownlint-cli2-test-exec.mjs.snap b/test/snapshots/markdownlint-cli2-test-exec.mjs.snap index b09248bc..2a2c1c3b 100644 Binary files a/test/snapshots/markdownlint-cli2-test-exec.mjs.snap and b/test/snapshots/markdownlint-cli2-test-exec.mjs.snap differ diff --git a/test/snapshots/markdownlint-cli2-test-fs.mjs.md b/test/snapshots/markdownlint-cli2-test-fs.mjs.md index d76a9c20..0a2914aa 100644 --- a/test/snapshots/markdownlint-cli2-test-fs.mjs.md +++ b/test/snapshots/markdownlint-cli2-test-fs.mjs.md @@ -2366,15 +2366,19 @@ Generated by [AVA](https://avajs.dev). module/link.md:3:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ multiple/emoji.md:3:15 MD044/proper-names Proper names should have the correct capitalization [Expected: SMILE; Actual: smile]␊ multiple/emoji.md:5:13 MD044/proper-names Proper names should have the correct capitalization [Expected: FROWNING; Actual: frowning]␊ - multiple/emoji.md:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ + multiple/emoji.md:7:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + multiple/emoji.md:7:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + multiple/emoji.md:9 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ pre-imported/link.md:3:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ pre-imported/link.md:3:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ - single/emoji.md:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ + single/emoji.md:7:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + single/emoji.md:7:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + single/emoji.md:9 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ `, stdout: `markdownlint-cli2 vX.Y.Z (markdownlint vX.Y.Z)␊ Finding: **/*.md␊ Linting: 6 file(s)␊ - Summary: 12 error(s)␊ + Summary: 16 error(s)␊ `, } diff --git a/test/snapshots/markdownlint-cli2-test-fs.mjs.snap b/test/snapshots/markdownlint-cli2-test-fs.mjs.snap index ad8442e0..1ee69c9a 100644 Binary files a/test/snapshots/markdownlint-cli2-test-fs.mjs.snap and b/test/snapshots/markdownlint-cli2-test-fs.mjs.snap differ diff --git a/test/snapshots/markdownlint-cli2-test-main.mjs.md b/test/snapshots/markdownlint-cli2-test-main.mjs.md index b0d52be9..59d8abf3 100644 --- a/test/snapshots/markdownlint-cli2-test-main.mjs.md +++ b/test/snapshots/markdownlint-cli2-test-main.mjs.md @@ -2884,12 +2884,13 @@ Generated by [AVA](https://avajs.dev). formatterJson: '', formatterJunit: '', formatterSarif: '', - stderr: `dir/about.md:1 every-n-lines Rule that reports an error every N lines [This rule threw an exception: getLineMetadata is not a function]␊ - dir/about.md:1 first-line Rule that reports an error for the first line␊ + stderr: `dir/about.md:1 first-line Rule that reports an error for the first line␊ dir/about.md:1:3 MD021/no-multiple-space-closed-atx Multiple spaces inside hashes on closed atx style heading [Context: "# About #"]␊ dir/about.md:1:10 MD021/no-multiple-space-closed-atx Multiple spaces inside hashes on closed atx style heading [Context: "# About #"]␊ + dir/about.md:3 every-n-lines Rule that reports an error every N lines [Line number 3]␊ dir/about.md:4 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "1. List"]␊ dir/about.md:5:1 MD029/ol-prefix Ordered list item prefix [Expected: 2; Actual: 3; Style: 1/2/3]␊ + dir/about.md:6 every-n-lines Rule that reports an error every N lines [Line number 6]␊ dir/subdir/hr.md:1:6 extended-ascii Only extended ASCII characters are allowed [Blocked character: 'βœ…']␊ dir/subdir/hr.md:1 first-line Rule that reports an error for the first line␊ dir/subdir/hr.md:3 sample-rule-commonjs Sample rule (commonjs) [Sample error for hr]␊ @@ -2905,35 +2906,38 @@ Generated by [AVA](https://avajs.dev). dir/subdir2/info.md:2:6 MD038/no-space-in-code Spaces inside code span elements [Context: "\` code1\`"]␊ dir/subdir2/info.md:2:20 MD038/no-space-in-code Spaces inside code span elements [Context: "\`code2 \`"]␊ dir/subdir2/info.md:4 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ - dir/subdir3/info.md:1 every-n-lines Rule that reports an error every N lines [This rule threw an exception: getLineMetadata is not a function]␊ dir/subdir3/info.md:1 first-line Rule that reports an error for the first line␊ dir/subdir3/info.md:1 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Information"]␊ dir/subdir3/info.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Information"]␊ dir/subdir3/info.md:2:6 MD038/no-space-in-code Spaces inside code span elements [Context: "\` code1\`"]␊ dir/subdir3/info.md:2:20 MD038/no-space-in-code Spaces inside code span elements [Context: "\`code2 \`"]␊ + dir/subdir3/info.md:3 every-n-lines Rule that reports an error every N lines [Line number 3]␊ dir/subdir3/info.md:4 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ dir2/hr.md:3 sample-rule-commonjs Sample rule (commonjs) [Sample error for hr]␊ dir2/hr.md:3 sample-rule-module Sample rule (module) [Sample error for hr]␊ - dir3/hr.md:1 every-n-lines Rule that reports an error every N lines [This rule threw an exception: getLineMetadata is not a function]␊ dir3/hr.md:1 first-line Rule that reports an error for the first line␊ dir3/hr.md:2 second-line Rule that reports an error for the second line␊ + dir3/hr.md:3 every-n-lines Rule that reports an error every N lines [Line number 3]␊ dir3/hr.md:3 sample-rule-commonjs Sample rule (commonjs) [Sample error for hr]␊ dir3/hr.md:3 sample-rule-module Sample rule (module) [Sample error for hr]␊ dir4/hr.md:3 sample-rule-commonjs Sample rule (commonjs) [Sample error for hr]␊ dir4/hr.md:3 sample-rule-module Sample rule (module) [Sample error for hr]␊ - viewme.md:1 every-n-lines Rule that reports an error every N lines [This rule threw an exception: getLineMetadata is not a function]␊ viewme.md:1 first-line Rule that reports an error for the first line␊ viewme.md:3 any-blockquote Rule that reports an error for any blockquote [Blockquote spans 1 line(s).] [Context: "> Tagli"]␊ + viewme.md:3 every-n-lines Rule that reports an error every N lines [Line number 3]␊ viewme.md:3:10 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]␊ viewme.md:5 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ + viewme.md:6 every-n-lines Rule that reports an error every N lines [Line number 6]␊ viewme.md:6 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "Description"]␊ + viewme.md:9 every-n-lines Rule that reports an error every N lines [Line number 9]␊ + viewme.md:12 every-n-lines Rule that reports an error every N lines [Line number 12]␊ viewme.md:12:4 MD019/no-multiple-space-atx Multiple spaces after hash on atx style heading [Context: "## Summary"]␊ viewme.md:14:14 MD047/single-trailing-newline Files should end with a single newline character␊ `, stdout: `markdownlint-cli2 vX.Y.Z (markdownlint vX.Y.Z)␊ Finding: **/*.md␊ Linting: 9 file(s)␊ - Summary: 45 error(s)␊ + Summary: 49 error(s)␊ `, } @@ -3034,15 +3038,19 @@ Generated by [AVA](https://avajs.dev). module/link.md:3:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ multiple/emoji.md:3:15 MD044/proper-names Proper names should have the correct capitalization [Expected: SMILE; Actual: smile]␊ multiple/emoji.md:5:13 MD044/proper-names Proper names should have the correct capitalization [Expected: FROWNING; Actual: frowning]␊ - multiple/emoji.md:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ + multiple/emoji.md:7:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + multiple/emoji.md:7:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + multiple/emoji.md:9 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ pre-imported/link.md:3:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ pre-imported/link.md:3:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ - single/emoji.md:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ + single/emoji.md:7:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + single/emoji.md:7:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + single/emoji.md:9 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ `, stdout: `markdownlint-cli2 vX.Y.Z (markdownlint vX.Y.Z)␊ Finding: **/*.md␊ Linting: 6 file(s)␊ - Summary: 12 error(s)␊ + Summary: 16 error(s)␊ `, } @@ -5462,15 +5470,19 @@ Generated by [AVA](https://avajs.dev). module/link.md:3:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ multiple/emoji.md:3:15 MD044/proper-names Proper names should have the correct capitalization [Expected: SMILE; Actual: smile]␊ multiple/emoji.md:5:13 MD044/proper-names Proper names should have the correct capitalization [Expected: FROWNING; Actual: frowning]␊ - multiple/emoji.md:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ + multiple/emoji.md:7:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + multiple/emoji.md:7:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + multiple/emoji.md:9 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ pre-imported/link.md:3:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ pre-imported/link.md:3:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ - single/emoji.md:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ + single/emoji.md:7:7 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + single/emoji.md:7:12 MD039/no-space-in-links Spaces inside link text [Context: "[ link ]"]␊ + single/emoji.md:9 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]␊ `, stdout: `markdownlint-cli2 vX.Y.Z (markdownlint vX.Y.Z)␊ Finding: **/*.md␊ Linting: 6 file(s)␊ - Summary: 12 error(s)␊ + Summary: 16 error(s)␊ `, } diff --git a/test/snapshots/markdownlint-cli2-test-main.mjs.snap b/test/snapshots/markdownlint-cli2-test-main.mjs.snap index f78e8cf1..69b0c4f3 100644 Binary files a/test/snapshots/markdownlint-cli2-test-main.mjs.snap and b/test/snapshots/markdownlint-cli2-test-main.mjs.snap differ diff --git a/webworker/module-stub.cjs b/webworker/module-stub.cjs deleted file mode 100644 index fec94871..00000000 --- a/webworker/module-stub.cjs +++ /dev/null @@ -1,8 +0,0 @@ -// @ts-check - -"use strict"; - -module.exports = { - // @ts-ignore - "createRequire": () => require -}; diff --git a/webworker/webpack.config.cjs b/webworker/webpack.config.cjs index 4b2c0732..0b0a9d77 100644 --- a/webworker/webpack.config.cjs +++ b/webworker/webpack.config.cjs @@ -52,7 +52,6 @@ module.exports = { "fallback": { "buffer": false, "fs": false, - "module": require.resolve("./module-stub.cjs"), "os": require.resolve("./os-stub.cjs"), "path": require.resolve("path-browserify"), "process": require.resolve("./process-stub.cjs"),