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

chore(share-data): add format and lint targets for js #16529

Merged
merged 5 commits into from
Oct 23, 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
31 changes: 29 additions & 2 deletions shared-data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,31 @@ tests ?=
cov_opts ?= --coverage=true
test_opts ?=

# warning suppression variables for tests and linting
quiet ?= false

FORMAT_FILE_GLOB = "**/*.@(ts|tsx|js|json|md|yml)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to add yml?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it doesn't hurt..?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it won't cause any issue.


# Top level targets

.PHONY: all
all: clean dist

.PHONY: setup
setup: setup-py setup-js
setup: setup-py

.PHONY: dist
dist: dist-js dist-py
dist: dist-py

.PHONY: clean
clean: clean-py

.PHONY: format
format: format-js format-py

.PHONY: lint
lint: lint-js lint-py

# JavaScript targets

.PHONY: lib-js
Expand All @@ -34,6 +45,22 @@ lib-js:
build-ts:
yarn tsc --build --emitDeclarationOnly

.PHONY: format-js
format-js:
yarn prettier --ignore-path ../.eslintignore --write $(FORMAT_FILE_GLOB)

.PHONY: lint-js
lint-js: lint-js-eslint lint-js-prettier

.PHONY: lint-js-eslint
lint-js-eslint:
yarn eslint --ignore-path ../.eslintignore --quiet=$(quiet) "**/*.@(js|ts|tsx)"

.PHONY: lint-js-prettier
lint-js-prettier:
yarn prettier --ignore-path ../.eslintignore --check $(FORMAT_FILE_GLOB)


# Python targets

.PHONY: setup-py
Expand Down
Loading