Skip to content

Commit fcfcbf9

Browse files
Update mdlint to disable descriptive-link-text (#7481)
Update the mdlint CI to ignore a newly introduced lint which is overly strict (IMO). Example failure: https://github.com/sigp/lighthouse/actions/runs/15102688734/job/42446029011?pr=7479 Ignore the new lint that requires link text to be descriptive. IMO it is completely fine to write links like `See docs [here](http://url.com)`.
1 parent 23ad833 commit fcfcbf9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/mdlint.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# Run `make mdlint` from the root of the repository instead.
66

77
# use markdownlint-cli to check for markdown files
8-
docker run --rm -v ./book:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest '**/*.md' --ignore node_modules
8+
# NOTE: we disable MD059 (descriptive-link-text) because it is too strict
9+
docker run --rm -v ./book:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest '**/*.md' --ignore node_modules --disable MD059
910

1011
# exit code
1112
exit_code=$(echo $?)
@@ -14,10 +15,10 @@ if [[ $exit_code == 0 ]]; then
1415
echo "All markdown files are properly formatted."
1516
exit 0
1617
elif [[ $exit_code == 1 ]]; then
17-
echo "Exiting with errors. Run 'make mdlint' locally and commit the changes. Note that not all errors can be fixed automatically, if there are still errors after running 'make mdlint', look for the errors and fix manually."
18+
echo "Exiting with errors. Run 'make mdlint' locally and commit the changes. Note that not all errors can be fixed automatically, if there are still errors after running 'make mdlint', look for the errors and fix manually."
1819
docker run --rm -v ./book:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest '**/*.md' --ignore node_modules --fix
1920
exit 1
2021
else
2122
echo "Exiting with exit code >1. Check for the error logs and fix them accordingly."
2223
exit 1
23-
fi
24+
fi

0 commit comments

Comments
 (0)