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

ci: two scripts for linting with and without fix #1630

Merged
merged 2 commits into from
Nov 10, 2021
Merged

Conversation

lisabaut
Copy link
Contributor

@lisabaut lisabaut commented Nov 10, 2021

Description

Currently the script yarn lint includes the --fix option.
As this script runs on GH actions too, the freshly formatted files - if any - would not be recognized / pushed to the repo.

With differentiating the two scripts yarn lint and yarn lin:fix it is easier to decide when to use what:

  • on the CI yarn lint without --fix to let the workflow fail when a file is not formatted correctly
  • locally with the husky pre-commit hook yarn lint without --fix in order to check wrong formatted files first before pushing to remote
  • before opening a PR run the script yarn lint:fix locally and commit formatted files accordingly (mentioned in the PR template)

Checklist

  • I have tested this on a device/simulator for each compatible OS
  • I formatted JS and TS files with yarn lint
  • I updated the documentation yarn generate
  • I mentioned this change in CHANGELOG.md
  • I updated the typings files (index.d.ts)
  • I added/ updated a sample (/example)

Screenshot OR Video

Copy link
Member

@ferdicus ferdicus left a comment

Choose a reason for hiding this comment

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

thank you 🙇🏿

@ferdicus ferdicus merged commit 0e2f436 into master Nov 10, 2021
@ferdicus ferdicus deleted the build/lint-fix branch November 10, 2021 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants