Skip to content

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

Merged
ferdicus merged 2 commits into
masterfrom
build/lint-fix
Nov 10, 2021
Merged

ci: two scripts for linting with and without fix#1630
ferdicus merged 2 commits into
masterfrom
build/lint-fix

Conversation

@lisabaut

@lisabaut lisabaut commented Nov 10, 2021

Copy link
Copy Markdown
Contributor

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

@lisabaut
lisabaut requested a review from ferdicus November 10, 2021 16:08

@ferdicus ferdicus left a comment

Copy link
Copy Markdown
Member

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