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

feat: remove empty lines #19

Merged
merged 8 commits into from
Sep 16, 2024
Merged

feat: remove empty lines #19

merged 8 commits into from
Sep 16, 2024

Conversation

kazushisan
Copy link
Contributor

this change will make ts-remove-unused handle empty lines in a more sophisticated manner.

  • removes leading empty lines from files that were edited
  • removes trailing empty lines from files that were edited (limits the line break to max of 1)
  • if the edit results in 3 or more consecutive line breaks, it will limit the line break to 2

example: when const remove is not used in the following file

export const a = 'a';

export const remove = 'remove';

export const a2 = 'a2';

before

export const a = 'a';


export const a2 = 'a2';

after

export const a = 'a';

export const a2 = 'a2';

@kazushisan kazushisan added the feature New feature or request label Sep 16, 2024
@kazushisan kazushisan self-assigned this Sep 16, 2024
@kazushisan kazushisan merged commit 916be61 into main Sep 16, 2024
1 check passed
@kazushisan kazushisan deleted the feat/remove-empty-lines branch September 16, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant