mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2024-12-22 12:53:32 +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
|
||||
runs:
|
||||
using: node20
|
||||
main: dist/index.js
|
||||
main: dist/index.mjs
|
||||
|
|
46355
dist/index.js → dist/index.mjs
vendored
46355
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"],
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
];
|
||||
|
|
|
@ -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) => {
|
13
package.json
13
package.json
|
@ -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,16 +16,13 @@
|
|||
"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",
|
||||
"markdownlint-cli2": "0.16.0"
|
||||
"markdownlint-cli2": "DavidAnson/markdownlint-cli2#esm"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "9.16.0",
|
||||
|
|
Loading…
Reference in a new issue