diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c50f40..af386ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,13 +15,13 @@ jobs: - run: npm install --no-package-lock - run: npm run test no-globs: - name: No globs (README.md, no errors) + name: No globs (README.md, 0 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: ./ one-glob: - name: One glob (test/errors.md, errors) + name: One glob (test/errors.md, 3 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -29,7 +29,7 @@ jobs: with: globs: test/errors.md two-globs: - name: Two globs (README.md and test/errors.md, errors) + name: Two globs (README.md and test/errors.md, 3 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -39,7 +39,7 @@ jobs: *.md test/* command-config: - name: Command = config (test/errors.md, errors) + name: Command = config (test/errors.md, 2 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -50,7 +50,7 @@ jobs: config/.markdownlint.jsonc test/* command-config-missing: - name: Command = config (missing configuration file) + name: Command = config (missing configuration file, fails) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -58,7 +58,7 @@ jobs: with: command: config command-fix: - name: Command = fix (test/errors.md, no errors) + name: Command = fix (test/errors.md, 0 errors) runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc deleted file mode 100644 index 9ed85d8..0000000 --- a/.markdownlint.jsonc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "line-length": { - "strict": true, - "code_blocks": false - }, - "proper-names": { - "code_blocks": false, - "names": [ - "CommonMark", - "JavaScript", - "Markdown", - "markdown-it", - "markdownlint", - "markdownlint-cli2", - "Node.js" - ] - } -} diff --git a/config/.markdownlint.jsonc b/config/.markdownlint.jsonc index 35c7d6f..9ed85d8 100644 --- a/config/.markdownlint.jsonc +++ b/config/.markdownlint.jsonc @@ -1,3 +1,18 @@ { - "single-trailing-newline": false + "line-length": { + "strict": true, + "code_blocks": false + }, + "proper-names": { + "code_blocks": false, + "names": [ + "CommonMark", + "JavaScript", + "Markdown", + "markdown-it", + "markdownlint", + "markdownlint-cli2", + "Node.js" + ] + } } diff --git a/config/test.markdownlint.jsonc b/config/test.markdownlint.jsonc new file mode 100644 index 0000000..35c7d6f --- /dev/null +++ b/config/test.markdownlint.jsonc @@ -0,0 +1,3 @@ +{ + "single-trailing-newline": false +} diff --git a/package.json b/package.json index 435a7b0..8bab955 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "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 && markdownlint-cli2 *.md", + "lint": "eslint *.js && markdownlint-cli2-config ./config/.markdownlint.jsonc *.md", "test": "npm run lint && npm run build && git diff --exit-code", "upgrade": "npx --yes npm-check-updates --upgrade" },