Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix eslint makefile target #54999

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1388,19 +1388,19 @@ run-lint-js = tools/eslint/node_modules/eslint/bin/eslint.js --cache \
--max-warnings=0 --report-unused-disable-directives $(LINT_JS_TARGETS)
run-lint-js-fix = $(run-lint-js) --fix

tools/eslint/node_modules: tools/eslint/package-lock.json
tools/eslint/node_modules/eslint/bin/eslint.js: tools/eslint/package-lock.json
-cd tools/eslint && $(call available-node,$(run-npm-ci))

.PHONY: lint-js-fix
lint-js-fix: tools/eslint/node_modules
lint-js-fix: tools/eslint/node_modules/eslint/bin/eslint.js
@$(call available-node,$(run-lint-js-fix))

.PHONY: lint-js
.PHONY: lint-js-doc
# Note that on the CI `lint-js-ci` is run instead.
# Lints the JavaScript code with eslint.
lint-js-doc: LINT_JS_TARGETS=doc
lint-js lint-js-doc: tools/eslint/node_modules
lint-js lint-js-doc: tools/eslint/node_modules/eslint/bin/eslint.js
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping $@ (no crypto)"; \
else \
Expand All @@ -1417,7 +1417,7 @@ run-lint-js-ci = tools/eslint/node_modules/eslint/bin/eslint.js \

.PHONY: lint-js-ci
# On the CI the output is emitted in the TAP format.
lint-js-ci: tools/eslint/node_modules
lint-js-ci: tools/eslint/node_modules/eslint/bin/eslint.js
$(info Running JS linter...)
@$(call available-node,$(run-lint-js-ci))

Expand Down
Loading