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

refactor: refactor cli #285

Merged
merged 1 commit into from
Jan 30, 2023
Merged

refactor: refactor cli #285

merged 1 commit into from
Jan 30, 2023

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Jan 30, 2023

  • Separate features into different functions, so we can easily exit.
  • Use process.exitCode instead of process.exit()
  • Change exit code to 1 (file not sorted) and 2 (fatal errors)
  • Update husky and lint-staged setup
  • Minor tweak to the help information

Q: Should we consider breaking change for changing the exit code?

- Separate features into different functions, so we can easily return.
- Use `process.exitCode` instead of `process.exit()`
- Change exit code to 1 (file not sorted) and 2 (fatal errors)
- Update husky and lint-staged setup
- Minor tweak to the help information
@fisker fisker requested a review from keithamus January 30, 2023 14:32
Copy link
Owner

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

I personally don't think error code changes are breaking, but I will leave it down to you to rebase commits as necessary.

@fisker fisker merged commit 1488785 into keithamus:master Jan 30, 2023
@fisker fisker deleted the cli-refactor branch January 30, 2023 16:03
const sorted = sortPackageJson(packageJson)
const patterns = []
let isCheck = false
let shouldBeQuit = false

This comment was marked as outdated.

@github-actions
Copy link

github-actions bot commented Feb 1, 2023

🎉 This PR is included in version 2.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants