@@ -1335,21 +1335,6 @@ bench-addons-clean:
13351335 $(RM) -r benchmark/napi/*/build
13361336 $(RM) benchmark/napi/.buildstamp
13371337
1338- .PHONY: lint-md-rollup
1339- lint-md-rollup:
1340- $(RM) tools/.*mdlintstamp
1341- cd tools/lint-md && npm ci && npm run build
1342-
1343- .PHONY: lint-md-clean
1344- .NOTPARALLEL: lint-md-clean
1345- lint-md-clean:
1346- $(RM) -r tools/lint-md/node_modules
1347- $(RM) tools/.*mdlintstamp
1348-
1349- .PHONY: lint-md-build
1350- lint-md-build:
1351- $(warning Deprecated no-op target 'lint-md-build')
1352-
13531338ifeq ("$(wildcard tools/.mdlintstamp)","")
13541339LINT_MD_NEWER =
13551340else
@@ -1361,8 +1346,13 @@ LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \
13611346 ! -path '*node_modules*' ! -path 'test/fixtures/*' -name '*.md' \
13621347 $(LINT_MD_NEWER))
13631348run-lint-md = tools/lint-md/lint-md.mjs $(LINT_MD_FILES)
1349+
1350+ # Check for a specific file, as (empty) directories are persisted in git.
1351+ tools/lint-md/node_modules/remark-parse/package.json:
1352+ -cd tools/lint-md && $(call available-node,$(run-npm-ci))
1353+
13641354# Lint all changed markdown files maintained by us
1365- tools/.mdlintstamp: $(LINT_MD_FILES)
1355+ tools/.mdlintstamp: tools/lint-md/node_modules/remark-parse/package.json $(LINT_MD_FILES)
13661356 $(info Running Markdown linter...)
13671357 @$(call available-node,$(run-lint-md))
13681358 @touch $@
@@ -1372,7 +1362,7 @@ lint-md: lint-js-doc | tools/.mdlintstamp ## Lint the markdown documents maintai
13721362
13731363run-format-md = tools/lint-md/lint-md.mjs --format $(LINT_MD_FILES)
13741364.PHONY: format-md
1375- format-md: ## Format the markdown documents maintained by us in the codebase.
1365+ format-md: tools/lint-md/node_modules/remark-parse/package.json ## Format the markdown documents maintained by us in the codebase.
13761366 @$(call available-node,$(run-format-md))
13771367
13781368
@@ -1601,6 +1591,7 @@ lint-clean: ## Remove linting artifacts.
16011591 $(RM) tools/.*lintstamp
16021592 $(RM) .eslintcache
16031593 $(RM) -r tools/eslint/node_modules
1594+ $(RM) -r tools/lint-md/node_modules
16041595 $(RM) tools/pip/site_packages
16051596
16061597HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
0 commit comments