From fcfcbf9a11b3b1b2c9cc78d4cee0ff39b8b539ed Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Mon, 19 May 2025 13:35:51 +1000 Subject: [PATCH] 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)`. --- scripts/mdlint.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/mdlint.sh b/scripts/mdlint.sh index 5274f108d2..abb545ad2f 100755 --- a/scripts/mdlint.sh +++ b/scripts/mdlint.sh @@ -5,7 +5,8 @@ # Run `make mdlint` from the root of the repository instead. # use markdownlint-cli to check for markdown files -docker run --rm -v ./book:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest '**/*.md' --ignore node_modules +# NOTE: we disable MD059 (descriptive-link-text) because it is too strict +docker run --rm -v ./book:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest '**/*.md' --ignore node_modules --disable MD059 # exit code exit_code=$(echo $?) @@ -14,10 +15,10 @@ if [[ $exit_code == 0 ]]; then echo "All markdown files are properly formatted." exit 0 elif [[ $exit_code == 1 ]]; then - 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." + 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." docker run --rm -v ./book:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest '**/*.md' --ignore node_modules --fix exit 1 else echo "Exiting with exit code >1. Check for the error logs and fix them accordingly." exit 1 -fi \ No newline at end of file +fi