Skip to content

Commit dfbcb12

Browse files
Fix option to ignore CHANGELOG.md in URL linting
Previously attempted to exclude CHANGELOG.md from external URL linting using `ignorePatterns` setting in config file, but this option doesn't exist as confirmed in remarkjs/discussions#1423. Replace with proper `--ignore-pattern` CLI argument in npm script to correctly exclude the file from link validation.
1 parent ee1b472 commit dfbcb12

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

.remark-lint-no-dead-urls.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ const PluginOptions = {
1111
].map(buildUrlPattern),
1212
};
1313

14-
/** @type {import('unified-engine').Options} */
15-
const EngineOptions = {
16-
ignorePatterns: ['CHANGELOG.md'],
17-
};
18-
1914
/** @type {import('unified-engine').Preset} */
2015
export default {
2116
plugins: [[remarkLintNoDeadUrls, PluginOptions]],
22-
settings: EngineOptions,
2317
};
2418

2519
function buildUrlPattern(fqdn) {

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ As a small open source project with small community, it can sometimes take a lon
1212

1313
## Pull request process
1414

15-
Your pull requests are actively welcomed. We collaborate using [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow).
15+
Your pull requests are actively welcomed. We collaborate using [GitHub flow](https://web.archive.org/web/20250317121135/https://docs.github.com/en/get-started/using-github/github-flow).
1616

1717
The steps:
1818

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"lint:md": "markdownlint **/*.md --ignore node_modules",
2929
"lint:md:consistency": "remark . --frail --use remark-preset-lint-consistent",
3030
"lint:md:relative-urls": "remark . --frail --use remark-validate-links",
31-
"lint:md:external-urls": "remark . --frail --rc-path .remark-lint-no-dead-urls.js",
31+
"lint:md:external-urls": "remark . --frail --rc-path .remark-lint-no-dead-urls.js --ignore-pattern CHANGELOG.md",
3232
"lint:yaml": "yamllint **/*.yaml --ignore=node_modules/**/*.yaml",
3333
"lint:pylint": "pylint **/*.py",
3434
"postinstall": "electron-builder install-app-deps",

0 commit comments

Comments
 (0)