-
Notifications
You must be signed in to change notification settings - Fork 178
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
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1ca8c0a
added eslintignore file and makefile targets for js format, lint
sanni-t 2722d12
remove irrelevant todo
sanni-t c1bdbbc
Merge branch 'edge' into chore-shared_data_js_format_lint
sanni-t 4ebe96b
address comments
sanni-t ada91b4
remove redundant ignore pattern
sanni-t File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)" | ||
|
||
# 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 | ||
|
@@ -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) --ignore-pattern "node_modules/" "**/*.@(js|ts|tsx)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
.PHONY: lint-js-prettier | ||
lint-js-prettier: | ||
yarn prettier --ignore-path ../.eslintignore --check $(FORMAT_FILE_GLOB) | ||
|
||
|
||
# Python targets | ||
|
||
.PHONY: setup-py | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add
yml
?There was a problem hiding this comment.
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..?
There was a problem hiding this comment.
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.