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
🏗✨ Check non-JS files for formatting errors using prettier
during local and Travis PR checks
#25057
Conversation
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.
Awesome! Thanks for figuring this out. Left a couple comments, approving to unblock
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.
Addressed PR comments.
OWNERS
files during local and Travis PR checksprettier
during local and Travis PR checks
@estherkim I've rewritten this PR based on our discussion. The |
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.
@rcebulko All comments addressed.
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.
One comment re: [].forEach(async .. => ...)
, approving to unblock
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.
Thank you for the work on this! And thanks for clarifying the changes in the PR description.
Thanks for the reviews. Looks like the latest rebase caught some bad formatting: https://travis-ci.org/ampproject/amphtml/jobs/598788352#L412 I'll rebase, fix, and check this in once Travis is green. |
…ocal and Travis PR checks (ampproject#25057)
…ocal and Travis PR checks (ampproject#25057)
PR highlights:
gulp prettify
to check non-JS files for formatting errors usingprettier
gulp check-owners
to checkOWNERS
files for correctness (with a placeholder check until [owners] implement blocking Travis check to validate modified OWNERS.yaml syntax amp-github-apps#281 is fixed)gulp json-syntax
since it will be replaced bygulp prettify
for.json
filesbuild-system/tasks/json-syntax.js
tobuild-system/tasks/caches-json.js
now that it only checkscaches.json
for correctnessOWNERS
files (so all tests aren't run for PRs that only touchOWNERS
files)lint
,prettify
, etc. to a new filebuild-system/common/utils.js
Coming up:
**/*.json
and all json / json5 dotfiles to the list of files that are checked bygulp prettify
(with auto-fixes) (🏗 Enablegulp prettify
on several non-JS files (and auto-fix them) #25085)--local_changes
mode togulp prettify
(requires further refactoring oflint.js
andprettify.js
) (🏗 Add a--local_changes
mode togulp prettify
#25093)gulp check-owners
with a call to the owners bot's parsing API ([owners] implement blocking Travis check to validate modified OWNERS.yaml syntax amp-github-apps#281)Usage:
Fixes #24936
Fixes #24942