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

Format TypeScript/JavaScript files #1038

Merged
merged 5 commits into from Sep 20, 2022
Merged

Conversation

PhilippGackstatter
Copy link
Contributor

@PhilippGackstatter PhilippGackstatter commented Sep 19, 2022

Description of change

Format TypeScript and JavaScript files with dprint by adding a new plugin. This should integrate nicely with our existing CI infrastructure and the formatting we already do on machines locally.

The configuration is the plugin's default, except for indentWidth = 4 and arrayExpression.preferHanging to match what we already use mostly. The config and its defaults can be found here, in case we want to customize more things: https://dprint.dev/plugins/typescript/config/.

The idea is to format all js and ts files by default, but excluding certain directories like node_modules or target, which should ensure that directories added in the future should automatically opt-in to formatting.

Links to any relevant issues

n/a

Type of change

Add an x to the boxes that are relevant to your changes.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

dprint check

Change checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for 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
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@PhilippGackstatter PhilippGackstatter added Wasm Related to Wasm bindings. Becomes part of the Wasm changelog No changelog Excludes PR from becoming part of any changelog labels Sep 19, 2022
@PhilippGackstatter PhilippGackstatter added this to the v0.7 Features milestone Sep 19, 2022
Copy link
Contributor

@cycraig cycraig left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@PhilippGackstatter PhilippGackstatter merged commit 190b7b6 into dev Sep 20, 2022
@PhilippGackstatter PhilippGackstatter deleted the chore/add-dprint-typescript branch September 20, 2022 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No changelog Excludes PR from becoming part of any changelog Wasm Related to Wasm bindings. Becomes part of the Wasm changelog
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants