diff --git a/.github/workflows/checks.quality.yaml b/.github/workflows/checks.quality.yaml index ca75b079..448db67d 100644 --- a/.github/workflows/checks.quality.yaml +++ b/.github/workflows/checks.quality.yaml @@ -15,7 +15,7 @@ jobs: - npm run lint:md:relative-urls - npm run lint:md:external-urls os: [ macos, ubuntu, windows ] - fail-fast: false # Still interested to see results from other combinations + fail-fast: false # Still interested to see results from other commands steps: - name: Checkout diff --git a/.remark-lint-no-dead-urls.js b/.remark-lint-no-dead-urls.js new file mode 100644 index 00000000..f748603c --- /dev/null +++ b/.remark-lint-no-dead-urls.js @@ -0,0 +1,22 @@ +import remarkLintNoDeadUrls from 'remark-lint-no-dead-urls'; + +/** @type {import('remark-lint-no-dead-urls').Options} */ +const Options = { + skipUrlPatterns: [ + // These result in false negatives + 'archive.ph', + 'scoop.sh', + 'localhost:8080', + 'web.archive.org', + ].map(buildUrlPattern), +}; + +/** @type {Omit..yaml`**. - Kebab-case allows to have better URL references to them. - [README.md](./../README.md) uses URL references to show status badges for actions. -[1]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows +[1]: https://web.archive.org/web/20250126141528/https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#about-yaml-syntax-for-workflows "Workflow syntax for GitHub Actions - GitHub Docs | docs.github.com" diff --git a/package.json b/package.json index e5eab370..3b89798b 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "lint:md": "markdownlint **/*.md --ignore node_modules", "lint:md:consistency": "remark . --frail --use remark-preset-lint-consistent", "lint:md:relative-urls": "remark . --frail --use remark-validate-links", - "lint:md:external-urls": "remark . --frail --use remark-lint-no-dead-urls", + "lint:md:external-urls": "remark . --frail --rc-path .remark-lint-no-dead-urls.js", "lint:yaml": "yamllint **/*.yaml --ignore=node_modules/**/*.yaml", "lint:pylint": "pylint **/*.py", "postinstall": "electron-builder install-app-deps",