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 required: false
runs: runs:
using: node20 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"], 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"
}
} }
]; ];

View file

@ -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) => {

View file

@ -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,12 +16,9 @@
"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",