mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2024-12-22 21:03:53 +01:00
Convert to an ECMAScript module.
This commit is contained in:
parent
1d35a78422
commit
72e1a9ae3a
5 changed files with 25734 additions and 20653 deletions
|
@ -23,4 +23,4 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node20
|
||||||
main: dist/index.js
|
main: dist/index.mjs
|
||||||
|
|
46379
dist/index.js → dist/index.mjs
vendored
46379
dist/index.js → dist/index.mjs
vendored
File diff suppressed because one or more lines are too long
|
@ -18,9 +18,6 @@ export default [
|
||||||
}),
|
}),
|
||||||
eslintPluginUnicorn.configs["flat/all"],
|
eslintPluginUnicorn.configs["flat/all"],
|
||||||
{
|
{
|
||||||
"languageOptions": {
|
|
||||||
"sourceType": "commonjs"
|
|
||||||
},
|
|
||||||
"linterOptions": {
|
"linterOptions": {
|
||||||
"reportUnusedDisableDirectives": true
|
"reportUnusedDisableDirectives": true
|
||||||
},
|
},
|
||||||
|
@ -40,13 +37,5 @@ export default [
|
||||||
"unicorn/prefer-module": "off",
|
"unicorn/prefer-module": "off",
|
||||||
"unicorn/prefer-top-level-await": "off"
|
"unicorn/prefer-top-level-await": "off"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": [
|
|
||||||
"eslint.config.mjs"
|
|
||||||
],
|
|
||||||
"languageOptions": {
|
|
||||||
"sourceType": "module"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
"use strict";
|
import * as core from "@actions/core";
|
||||||
|
import { main as markdownlintCli2 } from "markdownlint-cli2";
|
||||||
const core = require("@actions/core");
|
|
||||||
const { "main": markdownlintCli2 } = require("markdownlint-cli2");
|
|
||||||
|
|
||||||
const logMessage = core.info;
|
const logMessage = core.info;
|
||||||
const outputFormatter = (options) => {
|
const outputFormatter = (options) => {
|
13
package.json
13
package.json
|
@ -7,7 +7,7 @@
|
||||||
"url": "https://dlaa.me/"
|
"url": "https://dlaa.me/"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "commonjs",
|
"type": "module",
|
||||||
"homepage": "https://github.com/DavidAnson/markdownlint-cli2-action",
|
"homepage": "https://github.com/DavidAnson/markdownlint-cli2-action",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -16,16 +16,13 @@
|
||||||
"bugs": "https://github.com/DavidAnson/markdownlint-cli2-action/issues",
|
"bugs": "https://github.com/DavidAnson/markdownlint-cli2-action/issues",
|
||||||
"funding": "https://github.com/sponsors/DavidAnson",
|
"funding": "https://github.com/sponsors/DavidAnson",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build markdownlint-cli2-action.js",
|
"build": "ncc build markdownlint-cli2-action.mjs",
|
||||||
"docker-npm-install": "docker run --rm --tty --name npm-install --volume $PWD:/home/workdir --workdir /home/workdir --user node node:16 npm install",
|
"lint": "eslint *.mjs --max-warnings 0 && markdownlint-cli2 *.md",
|
||||||
"docker-npm-run-upgrade": "docker run --rm --tty --name npm-run-upgrade --volume $PWD:/home/workdir --workdir /home/workdir --user node node:16 npm run upgrade",
|
"test": "npm run lint && npm run build && git diff --exit-code"
|
||||||
"lint": "eslint *.js eslint.config.mjs --max-warnings 0 && markdownlint-cli2 *.md",
|
|
||||||
"test": "npm run lint && npm run build && git diff --exit-code",
|
|
||||||
"upgrade": "npx --yes npm-check-updates --upgrade"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "1.11.1",
|
"@actions/core": "1.11.1",
|
||||||
"markdownlint-cli2": "0.16.0"
|
"markdownlint-cli2": "DavidAnson/markdownlint-cli2#esm"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "9.16.0",
|
"@eslint/js": "9.16.0",
|
||||||
|
|
Loading…
Reference in a new issue