Skip to content

Commit

Permalink
tools: de-rollup-ify lint-md
Browse files Browse the repository at this point in the history
The rollup stuff stopped working with the massive remark ecosystem move
to ESM. Rather than try to troubleshoot, simplify things by removing
rollup. It's a great tool for a lot of uses, but less may be more here.

This does mean checking in a `node_modules` directory so that the linter
runs out-of-the-box, like we do for ESLint.
  • Loading branch information
Trott committed Aug 15, 2021
1 parent 4e4153f commit 7948656
Show file tree
Hide file tree
Showing 1,736 changed files with 219,623 additions and 93,057 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Get release version numbers
if: ${{ github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }}
id: get-released-versions
run: ./tools/node-lint-md-cli-rollup/src/list-released-versions-from-changelogs.mjs
run: ./tools/node-lint-md/list-released-versions-from-changelogs.mjs
- name: Lint docs
run: |
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1212,13 +1212,10 @@ bench-addons-clean:

.PHONY: lint-md-rollup
lint-md-rollup:
$(RM) tools/.*mdlintstamp
cd tools/node-lint-md-cli-rollup && npm install
cd tools/node-lint-md-cli-rollup && npm run build-node
$(warning Deprecated no-op target 'lint-md-rollup')

.PHONY: lint-md-clean
lint-md-clean:
$(RM) -r tools/node-lint-md-cli-rollup/node_modules
$(RM) tools/.*mdlintstamp

.PHONY: lint-md-build
Expand All @@ -1235,7 +1232,7 @@ LINT_MD_TARGETS = doc src lib benchmark test tools/doc tools/icu $(wildcard *.md
LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \
! -path '*node_modules*' ! -path 'test/fixtures/*' -name '*.md' \
$(LINT_MD_NEWER))
run-lint-md = tools/lint-md.js -q -f --no-stdout $(LINT_MD_FILES)
run-lint-md = tools/node-lint-md/cli.mjs -q -f --no-stdout $(LINT_MD_FILES)
# Lint all changed markdown files maintained by us
tools/.mdlintstamp: $(LINT_MD_FILES)
$(info Running Markdown linter...)
Expand Down
Loading

0 comments on commit 7948656

Please sign in to comment.