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

Handle automatically detecting formatter and reformatting after cleaning #6

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

theBGuy
Copy link
Owner

@theBGuy theBGuy commented Jan 4, 2025

Description

This pull request introduces several enhancements to the RN Native Stylesheet Cleaner project, including the addition of a new option to control code formatting and the implementation of automatic code formatting detection and application. Below are the most important changes:

Documentation Updates:

  • Updated the documentation to include the new --no-format option and explain the experimental automatic code formatting feature. [1] [2]

Code Enhancements:

  • Added the --no-format option to the command-line interface in src/index.ts.
  • Implemented automatic detection of code formatters (Prettier or Biome) and applied formatting based on the detected formatter in src/index.ts. [1] [2]
  • Introduced the detectFormatter and formatFile functions in a new src/utils.ts file to handle the detection and application of code formatting.

These changes improve the usability of the tool by allowing users to control code formatting behavior and automate the formatting process based on the presence of configuration files.

@theBGuy theBGuy merged commit e9e2dce into master Jan 4, 2025
@theBGuy theBGuy deleted the feat/formatter-detection branch January 4, 2025 19:38
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.

1 participant