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

Use dprint for formatting #811

Merged
merged 17 commits into from
Aug 18, 2023
Merged

Use dprint for formatting #811

merged 17 commits into from
Aug 18, 2023

Conversation

eritbh
Copy link
Member

@eritbh eritbh commented Aug 10, 2023

Fixes #784. Sets us up to use dprint for formatting the project. Removes formatting-specific eslint rules.

I lean towards using dprint isntead of prettier for formatting because it's more configurable and lets us maintain a style relatively similar to what we already have. This PR touches lots of files, but the only things that are really super different are line wrapping behaviors in certain areas and disallowing declaring multiple variables in a single let/const statement. It also has much more sane formatting for complex multiline ternary expressions than prettier.

dprint uses the same set of rules for formatting both Javascript and Typescript, and also does formatting for JSON and Markdown files.

I'll need to re-enable non-squash merges for this repo before I merge this - the PR adds a .git-blame-ignore-revs file with commit hashes of specific commits in this PR, so those commits need to not be squashed when merging for it to work correctly.

@eritbh eritbh added code quality meta concerns related to releasing/maintenance/etc that don't rely on changes to extension code labels Aug 10, 2023
dprint.json Show resolved Hide resolved
Copy link
Contributor

@ashen-dawn ashen-dawn left a comment

Choose a reason for hiding this comment

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

It never fails on build files, looks good.

@eritbh eritbh merged commit 140d568 into master Aug 18, 2023
3 checks passed
@eritbh eritbh deleted the chore/dprint branch August 18, 2023 15:21
eritbh added a commit that referenced this pull request Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality meta concerns related to releasing/maintenance/etc that don't rely on changes to extension code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rework project formatting
2 participants