0
0
Fork 0
mirror of https://github.com/DavidAnson/markdownlint-cli2-action.git synced 2024-11-23 14:46:28 +01:00

Convert markdownlint-cli2-action.js to .mjs.

This commit is contained in:
David Anson 2024-11-17 16:48:20 -08:00
parent cf10677dea
commit 05ffca6148
5 changed files with 116 additions and 449 deletions

View file

@ -23,4 +23,4 @@ inputs:
required: false
runs:
using: node20
main: dist/index.js
main: dist/index.mjs

File diff suppressed because it is too large Load diff

View file

@ -18,9 +18,6 @@ export default [
}),
eslintPluginUnicorn.configs["flat/all"],
{
"languageOptions": {
"sourceType": "commonjs"
},
"linterOptions": {
"reportUnusedDisableDirectives": true
},
@ -40,13 +37,5 @@ export default [
"unicorn/prefer-module": "off",
"unicorn/prefer-top-level-await": "off"
}
},
{
"files": [
"eslint.config.mjs"
],
"languageOptions": {
"sourceType": "module"
}
}
];

View file

@ -1,9 +1,7 @@
// @ts-check
"use strict";
const core = require("@actions/core");
const { "main": markdownlintCli2 } = require("markdownlint-cli2");
import * as core from "@actions/core";
import { main as markdownlintCli2 } from "markdownlint-cli2";
const logMessage = core.info;
const outputFormatter = (options) => {

View file

@ -7,7 +7,7 @@
"url": "https://dlaa.me/"
},
"license": "MIT",
"type": "commonjs",
"type": "module",
"homepage": "https://github.com/DavidAnson/markdownlint-cli2-action",
"repository": {
"type": "git",
@ -16,12 +16,9 @@
"bugs": "https://github.com/DavidAnson/markdownlint-cli2-action/issues",
"funding": "https://github.com/sponsors/DavidAnson",
"scripts": {
"build": "ncc build markdownlint-cli2-action.js",
"docker-npm-install": "docker run --rm --tty --name npm-install --volume $PWD:/home/workdir --workdir /home/workdir --user node node:16 npm install",
"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",
"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"
"build": "ncc build markdownlint-cli2-action.mjs",
"lint": "eslint *.mjs --max-warnings 0 && markdownlint-cli2 *.md",
"test": "npm run lint && npm run build && git diff --exit-code"
},
"dependencies": {
"@actions/core": "1.11.1",