Skip to content

relax requirement of files being in a ReScript project for formatting #385

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

Merged
merged 5 commits into from
Apr 8, 2022

Conversation

zth
Copy link
Collaborator

@zth zth commented Apr 7, 2022

This lifts the current requirement for files to be located in an actual ReScript project to be formatted. It falls back to formatting using the vendored parser pretty printer in the extension itself if the file isn't located in a ReScript project.

@zth zth requested a review from cristianoc April 7, 2022 16:40
Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

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

Actually, it currently formats even if there are syntax errors.
Needs to check for errors coming form the parser, and do no formatting in that case.

@zth zth requested a review from cristianoc April 8, 2022 11:19
Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

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

Looking good!

@cristianoc
Copy link
Collaborator

Looking good. OK to merge?

@zth zth merged commit 2c5fb50 into master Apr 8, 2022
@zth zth deleted the format-without-res-project branch April 8, 2022 11:32
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.

3 participants