GeezerVison is showing github.com — build,tools: add lint-js-doc target · nodejs/node@273e147
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: Makefile +6-3Lines changed: 6 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1194,23 +1194,26 @@ tools/.mdlintstamp: $(LINT_MD_FILES) |
1194 | 1194 |
|
1195 | 1195 | .PHONY: lint-md |
1196 | 1196 | # Lints the markdown documents maintained by us in the codebase. |
1197 | | -lint-md: | tools/.mdlintstamp |
| 1197 | +lint-md: lint-js-doc | tools/.mdlintstamp |
1198 | 1198 |
|
1199 | 1199 |
|
1200 | 1200 | LINT_JS_TARGETS = .eslintrc.js benchmark doc lib test tools |
1201 | 1201 |
|
1202 | 1202 | run-lint-js = tools/node_modules/eslint/bin/eslint.js --cache \ |
1203 | | - --report-unused-disable-directives --ext=.js,.mjs,.md $(LINT_JS_TARGETS) |
| 1203 | + --report-unused-disable-directives --ext=$(EXTENSIONS) $(LINT_JS_TARGETS) |
1204 | 1204 | run-lint-js-fix = $(run-lint-js) --fix |
1205 | 1205 |
|
1206 | 1206 | .PHONY: lint-js-fix |
1207 | 1207 | lint-js-fix: |
1208 | 1208 | @$(call available-node,$(run-lint-js-fix)) |
1209 | 1209 |
|
1210 | 1210 | .PHONY: lint-js |
| 1211 | +.PHONY: lint-js-doc |
1211 | 1212 | # Note that on the CI `lint-js-ci` is run instead. |
1212 | 1213 | # Lints the JavaScript code with eslint. |
1213 | | -lint-js: |
| 1214 | +lint-js: EXTENSIONS=.js,.mjs,.md |
| 1215 | +lint-js-doc: EXTENSIONS=.md |
| 1216 | +lint-js lint-js-doc: |
1214 | 1217 | @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ |
1215 | 1218 | echo "Skipping $@ (no crypto)"; \ |
1216 | 1219 | else \ |
|