Skip to content

Commit d03ce9d

Browse files
refacktargos
authored andcommitted
tools: use lint-md.js
* remove unused `tools/remark-cli` * vcbuild tested with `vcbuild nobuild noprojgen lint-md-build lint-md` PR-URL: #20109 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 22fefae commit d03ce9d

12 files changed

+22
-1471
lines changed

.eslintignore

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ test/message/esm_display_syntax_error.mjs
99
tools/icu
1010
tools/lint-md.js
1111
tools/node-lint-md-cli-rollup/dist
12-
tools/remark-*
1312
benchmark/tmp
1413
doc/**/*.js
1514
!.eslintrc.js

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
!.gitkeep
1515
!.mailmap
1616
!.nycrc
17-
!.remarkrc
1817
!.travis.yml
1918

2019
core
@@ -114,8 +113,6 @@ tools/doc/node_modules
114113
tools/clang-format/node_modules
115114

116115
# test artifacts
117-
tools/remark-cli/node_modules
118-
tools/remark-preset-lint-node/node_modules
119116
icu_config.gypi
120117
*.tap
121118

.remarkrc

-5
This file was deleted.

LICENSE

-26
Original file line numberDiff line numberDiff line change
@@ -1277,32 +1277,6 @@ The externally maintained libraries used by Node.js are:
12771277
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12781278
"""
12791279

1280-
- remark-cli, located at tools/remark-cli, is licensed as follows:
1281-
"""
1282-
(The MIT License)
1283-
1284-
Copyright (c) 2014-2016 Titus Wormer <[email protected]>
1285-
Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/)
1286-
1287-
Permission is hereby granted, free of charge, to any person obtaining a copy
1288-
of this software and associated documentation files (the "Software"), to deal
1289-
in the Software without restriction, including without limitation the rights
1290-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1291-
copies of the Software, and to permit persons to whom the Software is
1292-
furnished to do so, subject to the following conditions:
1293-
1294-
The above copyright notice and this permission notice shall be included in
1295-
all copies or substantial portions of the Software.
1296-
1297-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1298-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1299-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1300-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1301-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1302-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1303-
THE SOFTWARE.
1304-
"""
1305-
13061280
- node-inspect, located at deps/node-inspect, is licensed as follows:
13071281
"""
13081282
Copyright Node.js contributors. All rights reserved.

Makefile

+18-46
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,13 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
615615

616616
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
617617

618+
tools/doc/node_modules: tools/doc/package.json
619+
ifeq ($(node_use_openssl),true)
620+
cd tools/doc && $(call available-node,$(run-npm-ci))
621+
else
622+
@echo "Skipping tools/doc/node_modules (no crypto)"
623+
endif
624+
618625
.PHONY: doc-only
619626
doc-only: tools/doc/node_modules \
620627
$(apidoc_dirs) $(apiassets) ## Builds the docs with the local or the global Node.js binary.
@@ -932,8 +939,6 @@ $(TARBALL): release-only $(NODE_EXE) doc
932939
$(RM) -r $(TARNAME)/tools/osx-*
933940
$(RM) -r $(TARNAME)/tools/osx-pkg.pmdoc
934941
$(RM) -r $(TARNAME)/tools/pkgsrc
935-
$(RM) -r $(TARNAME)/tools/remark-cli
936-
$(RM) -r $(TARNAME)/tools/remark-preset-lint-node
937942
find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs $(RM)
938943
find $(TARNAME)/ -type l | xargs $(RM) # annoying on windows
939944
tar -cf $(TARNAME).tar $(TARNAME)
@@ -1061,74 +1066,41 @@ lint-md-rollup:
10611066
cd tools/node-lint-md-cli-rollup && npm up
10621067
cd tools/node-lint-md-cli-rollup && npm run build-node
10631068

1064-
1065-
10661069
.PHONY: lint-md-clean
10671070
lint-md-clean:
1068-
$(RM) -r tools/remark-cli/node_modules
10691071
$(RM) -r tools/node-lint-md-cli-rollup/remark-preset-lint-node/node_modules
1072+
$(RM) -r tools/node-lint-md-cli-rollup/node_modules
10701073
$(RM) tools/.*mdlintstamp
10711074

1072-
tools/remark-cli/node_modules: tools/remark-cli/package.json
1073-
@echo "Markdown linter: installing remark-cli into tools/"
1074-
@cd tools/remark-cli && $(call available-node,$(run-npm-ci))
1075-
1076-
tools/node-lint-md-cli-rollup/remark-preset-lint-node/node_modules: \
1077-
tools/node-lint-md-cli-rollup/remark-preset-lint-node/package.json
1078-
@echo "Markdown linter: installing remark-preset-lint-node"
1079-
@cd tools/node-lint-md-cli-rollup/remark-preset-lint-node && $(call available-node,$(run-npm-ci))
1080-
10811075
.PHONY: lint-md-build
1082-
lint-md-build: tools/remark-cli/node_modules \
1083-
tools/doc/node_modules \
1084-
tools/node-lint-md-cli-rollup/remark-preset-lint-node/node_modules
1085-
1086-
tools/doc/node_modules: tools/doc/package.json
1087-
ifeq ($(node_use_openssl),true)
1088-
cd tools/doc && $(call available-node,$(run-npm-ci))
1089-
else
1090-
@echo "Skipping tools/doc/node_modules (no crypto)"
1091-
endif
1092-
1093-
.PHONY: lint-md
1094-
ifneq ("","$(wildcard tools/remark-cli/node_modules/)")
1076+
lint-md-build:
1077+
$(warning "Deprecated no-op target 'lint-md-build'")
10951078

10961079
LINT_MD_DOC_FILES = $(shell ls doc/*.md doc/**/*.md)
1097-
run-lint-doc-md = tools/remark-cli/cli.js -q -f $(LINT_MD_DOC_FILES)
1080+
run-lint-doc-md = tools/lint-md.js -q -f $(LINT_MD_DOC_FILES)
10981081
# Lint all changed markdown files under doc/
10991082
tools/.docmdlintstamp: $(LINT_MD_DOC_FILES)
1100-
ifeq ($(node_use_openssl),true)
11011083
@echo "Running Markdown linter on docs..."
1102-
@$(call available-node,$(run-lint-doc-md))
1103-
@touch $@
1104-
else
1105-
@echo "Skipping Markdown linter on docs (no crypto)"
1106-
endif
1084+
$(call available-node,$(run-lint-doc-md))
1085+
touch $@
11071086

11081087
LINT_MD_TARGETS = src lib benchmark test tools/doc tools/icu
11091088
LINT_MD_ROOT_DOCS := $(wildcard *.md)
11101089
LINT_MD_MISC_FILES := $(shell find $(LINT_MD_TARGETS) -type f \
11111090
-not -path '*node_modules*' -name '*.md') $(LINT_MD_ROOT_DOCS)
1112-
run-lint-misc-md = tools/remark-cli/cli.js -q -f $(LINT_MD_MISC_FILES)
1091+
run-lint-misc-md = tools/lint-md.js -q -f $(LINT_MD_MISC_FILES)
11131092
# Lint other changed markdown files maintained by us
11141093
tools/.miscmdlintstamp: $(LINT_MD_MISC_FILES)
1115-
ifeq ($(node_use_openssl),true)
11161094
@echo "Running Markdown linter on misc docs..."
1117-
@$(call available-node,$(run-lint-misc-md))
1118-
@touch $@
1119-
else
1120-
@echo "Skipping Markdown linter on misc docs (no crypto)"
1121-
endif
1095+
$(call available-node,$(run-lint-misc-md))
1096+
touch $@
11221097

11231098
tools/.mdlintstamp: tools/.miscmdlintstamp tools/.docmdlintstamp
11241099

1100+
.PHONY: lint-md
11251101
# Lints the markdown documents maintained by us in the codebase.
11261102
lint-md: | tools/.mdlintstamp
1127-
else
1128-
lint-md:
1129-
@echo "The markdown linter is not installed."
1130-
@echo "To install (requires internet access) run: $ make lint-md-build"
1131-
endif
1103+
11321104

11331105
LINT_JS_TARGETS = .eslintrc.js benchmark doc lib test tools
11341106

tools/license-builder.sh

-3
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ addlicense "gtest" "deps/gtest" "$(cat ${rootdir}/deps/gtest/LICENSE)"
8585
# nghttp2
8686
addlicense "nghttp2" "deps/nghttp2" "$(cat ${rootdir}/deps/nghttp2/COPYING)"
8787

88-
# remark
89-
addlicense "remark-cli" "tools/remark-cli" "$(cat ${rootdir}/tools/remark-cli/LICENSE)"
90-
9188
# node-inspect
9289
addlicense "node-inspect" "deps/node-inspect" "$(cat ${rootdir}/deps/node-inspect/LICENSE)"
9390

tools/remark-cli/LICENSE

-22
This file was deleted.

tools/remark-cli/cli.js

-34
This file was deleted.

0 commit comments

Comments
 (0)