Add external URL linting for markdown files
This commit integrates `remark-lint-no-dead-urls` into the project's linting process, improving documentation quality by checking for dead links. Key changes: - Add NPM command to verify external URLs in markdown files - Include new command in the main lint script Other supporting changes: - Replace archive.ph link with Wayback Machine for better verification - Update `remark-lint-no-dead-urls` to latest version (2.0.0) - Update Browserslist DB to latest to avoid build errors
This commit is contained in:
3
.github/workflows/checks.quality.yaml
vendored
3
.github/workflows/checks.quality.yaml
vendored
@@ -11,8 +11,9 @@ jobs:
|
|||||||
- npm run lint:eslint
|
- npm run lint:eslint
|
||||||
- npm run lint:yaml
|
- npm run lint:yaml
|
||||||
- npm run lint:md
|
- npm run lint:md
|
||||||
- npm run lint:md:relative-urls
|
|
||||||
- npm run lint:md:consistency
|
- npm run lint:md:consistency
|
||||||
|
- npm run lint:md:relative-urls
|
||||||
|
- npm run lint:md:external-urls
|
||||||
os: [ macos, ubuntu, windows ]
|
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 combinations
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ See [ci-cd.md](./ci-cd.md) for more information.
|
|||||||
- Markdown: `npm run lint:md`
|
- Markdown: `npm run lint:md`
|
||||||
- Markdown consistency `npm run lint:md:consistency`
|
- Markdown consistency `npm run lint:md:consistency`
|
||||||
- Markdown relative URLs: `npm run lint:md:relative-urls`
|
- Markdown relative URLs: `npm run lint:md:relative-urls`
|
||||||
|
- Markdown external URLs: `npm run lint:md:external-urls`
|
||||||
- JavaScript/TypeScript: `npm run lint:eslint`
|
- JavaScript/TypeScript: `npm run lint:eslint`
|
||||||
- Yaml: `npm run lint:yaml`
|
- Yaml: `npm run lint:yaml`
|
||||||
|
|
||||||
|
|||||||
3839
package-lock.json
generated
3839
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
|||||||
"test:integration": "vitest run --dir tests/integration",
|
"test:integration": "vitest run --dir tests/integration",
|
||||||
"test:cy:run": "start-server-and-test \"vite build && vite preview --port 7070\" http://localhost:7070 \"cypress run --config baseUrl=http://localhost:7070\"",
|
"test:cy:run": "start-server-and-test \"vite build && vite preview --port 7070\" http://localhost:7070 \"cypress run --config baseUrl=http://localhost:7070\"",
|
||||||
"test:cy:open": "start-server-and-test \"vite --port 7070 --mode production\" http://localhost:7070 \"cypress open --config baseUrl=http://localhost:7070\"",
|
"test:cy:open": "start-server-and-test \"vite --port 7070 --mode production\" http://localhost:7070 \"cypress open --config baseUrl=http://localhost:7070\"",
|
||||||
"lint": "npm run lint:md && npm run lint:md:consistency && npm run lint:md:relative-urls && npm run lint:eslint && npm run lint:yaml && npm run lint:pylint",
|
"lint": "npm run lint:md && npm run lint:md:consistency && npm run lint:md:relative-urls && npm run lint:md:external-urls && npm run lint:eslint && npm run lint:yaml && npm run lint:pylint",
|
||||||
"install-deps": "node scripts/npm-install.js",
|
"install-deps": "node scripts/npm-install.js",
|
||||||
"icons:build": "node scripts/logo-update.js",
|
"icons:build": "node scripts/logo-update.js",
|
||||||
"check:desktop": "vitest run --dir tests/checks/desktop-runtime-errors --environment node",
|
"check:desktop": "vitest run --dir tests/checks/desktop-runtime-errors --environment node",
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
"lint:md": "markdownlint **/*.md --ignore node_modules",
|
"lint:md": "markdownlint **/*.md --ignore node_modules",
|
||||||
"lint:md:consistency": "remark . --frail --use remark-preset-lint-consistent",
|
"lint:md:consistency": "remark . --frail --use remark-preset-lint-consistent",
|
||||||
"lint:md:relative-urls": "remark . --frail --use remark-validate-links",
|
"lint:md:relative-urls": "remark . --frail --use remark-validate-links",
|
||||||
|
"lint:md:external-urls": "remark . --frail --use remark-lint-no-dead-urls",
|
||||||
"lint:yaml": "yamllint **/*.yaml --ignore=node_modules/**/*.yaml",
|
"lint:yaml": "yamllint **/*.yaml --ignore=node_modules/**/*.yaml",
|
||||||
"lint:pylint": "pylint **/*.py",
|
"lint:pylint": "pylint **/*.py",
|
||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
"markdownlint-cli": "^0.41.0",
|
"markdownlint-cli": "^0.41.0",
|
||||||
"postcss": "^8.4.39",
|
"postcss": "^8.4.39",
|
||||||
"remark-cli": "^12.0.1",
|
"remark-cli": "^12.0.1",
|
||||||
"remark-lint-no-dead-urls": "^1.1.0",
|
"remark-lint-no-dead-urls": "^2.0.0",
|
||||||
"remark-preset-lint-consistent": "^6.0.0",
|
"remark-preset-lint-consistent": "^6.0.0",
|
||||||
"remark-validate-links": "^13.0.1",
|
"remark-validate-links": "^13.0.1",
|
||||||
"sass": "^1.77.8",
|
"sass": "^1.77.8",
|
||||||
|
|||||||
Reference in New Issue
Block a user