diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f5f875..0e878e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,7 +76,7 @@ jobs: - name: Install markdownlint-cli2 dependencies locally run: sudo npm install --no-package-lock --production - name: Lint with formatters - run: node ./markdownlint-cli2 CONTRIBUTING.md README.md + run: node ./markdownlint-cli2.mjs CONTRIBUTING.md README.md lint-dockerfile: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index f09431b..85f9fcd 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,5 @@ npm-debug.log !test/customRules/node_modules !test/markdownItPlugins/module/node_modules !test/outputFormatters-module/node_modules -webworker/markdownlint-cli2-webworker.js -webworker/setImmediate.js +webworker/markdownlint-cli2-webworker.cjs +webworker/setImmediate.cjs diff --git a/eslint.config.mjs b/eslint.config.mjs index 1bc8300..56b2be9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -21,8 +21,8 @@ export default [ { "ignores": [ "test/*/**", - "webworker/markdownlint-cli2-webworker.js", - "webworker/setImmediate.js" + "webworker/markdownlint-cli2-webworker.cjs", + "webworker/setImmediate.cjs" ] }, { @@ -66,11 +66,7 @@ export default [ { "files": [ "**/*-formatter-*.js", - "webworker/*.cjs", - "webworker/*.js" - ], - "ignores": [ - "webworker/fs-virtual.js" + "webworker/*.cjs" ], "languageOptions": { "sourceType": "commonjs", diff --git a/markdownlint-cli2.mjs b/markdownlint-cli2.mjs index 0804adf..6ef2c20 100755 --- a/markdownlint-cli2.mjs +++ b/markdownlint-cli2.mjs @@ -886,8 +886,8 @@ const outputSummary = async ( const dirs = [ dir, ...modulePaths ]; const formattersAndParams = outputFormatters ? await importOrRequireIdsAndParams(dirs, outputFormatters, noRequire) - // eslint-disable-next-line unicorn/no-await-expression-member - : [ [ (await import("markdownlint-cli2-formatter-default")).default ] ]; + // eslint-disable-next-line no-inline-comments, unicorn/no-await-expression-member + : [ [ (await import(/* webpackMode: "eager" */ "markdownlint-cli2-formatter-default")).default ] ]; await Promise.all(formattersAndParams.map((formatterAndParams) => { const [ formatter, ...formatterParams ] = formatterAndParams; return formatter(formatterOptions, ...formatterParams); diff --git a/package.json b/package.json index 7bd73a9..46e500f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "test-watch": "git ls-files | entr npm run test", "update-snapshots": "ava --timeout=1m --update-snapshots test/markdownlint-cli2-test-exec.mjs test/markdownlint-cli2-test-fs.mjs test/markdownlint-cli2-test-main.mjs", "webworker": "cd webworker && webpack --mode none", - "webworker-install": "npm install --no-package-lock --no-save path-browserify setimmediate stream-browserify util webpack-cli && cpy ./node_modules/setimmediate/setImmediate.cjs ./webworker --flat" + "webworker-install": "npm install --no-package-lock --no-save path-browserify setimmediate stream-browserify util webpack-cli && cpy ./node_modules/setimmediate/setImmediate.js ./webworker/setImmediate.cjs --flat" }, "engines": { "node": ">=18" diff --git a/webworker/index.cjs b/webworker/index.cjs deleted file mode 100644 index 13cc62c..0000000 --- a/webworker/index.cjs +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-check - -"use strict"; - -module.exports = require("../markdownlint-cli2.mjs"); diff --git a/webworker/index.html b/webworker/index.html index e6f2ec3..93697b1 100644 --- a/webworker/index.html +++ b/webworker/index.html @@ -10,9 +10,9 @@
- - - - + + + +