🏗🚮 Simplify the way gulp lint
works on Travis
#22294
Merged
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.
Over the past year, various lint rules were added to improve AMP's code correctness. For example, #14742, #12748, #15255, #14761. In addition, lint checks were enabled for the code in
validator/
, which is developed in a different repo and periodically synced toamphtml
. See #18601 and #13966.As a result,
gulp lint
is run only against the files edited by a PR during PR builds, while hundreds of linter warnings are printed during push builds.This PR does the following:
amphtml-internal/prefer-deferred-promise
,amphtml-internal/unused-private-field
, andamphtml-internal/vsync
, and for thevalidator/
directorylint.js
to lint all files during Travis PR and push buildsprettier
for code formatting #21212 by starting with a clean slate of linter errorsFollow up tasks:
amphtml-internal/prefer-deferred-promise
,amphtml-internal/unused-private-field
, andamphtml-internal/vsync
errors and re-enable the rules in error mode (Find unused (dead) class fields #14742, Layers: Move element mutation logic into Layers #12748)validator/
and re-enable all rules invalidator/.eslintrc
(Fix all remaining lint warnings invalidator/
#18601, Include validator code in lint and presubmit checks #13966)