chore: add modifications to staging automatically after eslint fix#113443
chore: add modifications to staging automatically after eslint fix#113443suchcodemuchwow merged 4 commits intoelastic:masterfrom suchcodemuchwow:precommit-stage-lint-fixes
Conversation
After precommit hook runs with --fix flag changes are not added to staging. However it also does not validate staging area since eslint is only looking for last changes on file not staging area this results fellows to commit with linting errors which fails in CI. This commit resolves this issue by adding fixed files right after linting to staging area. Closes #52722
|
Pinging @elastic/kibana-operations (Team:Operations) |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…lastic#113443) After precommit hook runs with --fix flag changes are not added to staging. However it also does not validate staging area since eslint is only looking for last changes on file not staging area this results fellows to commit with linting errors which fails in CI. This commit resolves this issue by adding fixed files right after linting to staging area. Closes elastic#52722 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…113443) (#113611) After precommit hook runs with --fix flag changes are not added to staging. However it also does not validate staging area since eslint is only looking for last changes on file not staging area this results fellows to commit with linting errors which fails in CI. This commit resolves this issue by adding fixed files right after linting to staging area. Closes #52722 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Baturalp Gurdin <9674241+suchcodemuchwow@users.noreply.github.com>
|
Sorry @suchcodemuchwow, had to revert this change. It resulted in rather unexpected failures for other PRs with errors like: The error seems similar to what happens if you directly pass the SCSS to eslint |
|
Hey @tylersmalley, I'm not quite sure how it happened and if linting error happens it should have yelled & cancel the commit even before committing locally. The Linting process/PR change works in this way:
Note: |
|
Unreverted, looks like issue was actually in #113300 |
Closes #52722
After precommit hook runs with
--fixflag changes are not added to staging. However it also does notvalidate staging area since eslint is only looking for last changes on file not staging area this
results fellows to commit with linting errors which fails in CI. This commit resolves this issue by
adding fixed files right after linting to staging area.