Skip to content

Fix output format with prettier#9

Open
Pustur wants to merge 3 commits intoacmpesuecc:mainfrom
Pustur:output-format
Open

Fix output format with prettier#9
Pustur wants to merge 3 commits intoacmpesuecc:mainfrom
Pustur:output-format

Conversation

@Pustur
Copy link
Copy Markdown

@Pustur Pustur commented Oct 19, 2021

Description

I saw that prettier was already a dependency of the project so I decided to use it programmatically to automatically format the output files.

I decided to create a new file in the utils/ folder so that if the function needs to be updated we can do it in a single place.

After the change a couple parts of the code would throw errors, but I fixed them in different commits so it should be easier to understand. If you need more info on my fixes please feel free to ask.

I hope you like this approach.

Fixes #6

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Filtering out empty strings that can throw errors
Would cause an error with babel parser otherwise
Copy link
Copy Markdown
Collaborator

@avinash-vk avinash-vk left a comment

Choose a reason for hiding this comment

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

This is such a neat solution!
Thanks a ton for your contribution @Pustur !!

@avinash-vk avinash-vk added the hacktoberfest-accepted Your pull request is great. label Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Your pull request is great.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Mis-formatted file creation.

2 participants