Skip to content

Meta: Format JS/TS files with dprint#9437

Merged
fregante merged 6 commits into
mainfrom
dprint-ts
May 11, 2026
Merged

Meta: Format JS/TS files with dprint#9437
fregante merged 6 commits into
mainfrom
dprint-ts

Conversation

@fregante
Copy link
Copy Markdown
Member

I think now only .tsx is left

@github-actions github-actions Bot added the meta Related to Refined GitHub itself label May 11, 2026
Copy link
Copy Markdown
Member Author

@fregante fregante left a comment

Choose a reason for hiding this comment

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

Looks pretty simple and straightforward so far. I'll add tsx separately because it will touch a hundred files again.

Comment thread build/readme-parser.ts
const highlightedFeatureRegex
= /<p><a title="(?<highlightedId>[^"]+)"><\/a> (?<highlightedDescripion>.+)\n\t+<p><img src="(?<highlightedImage>.+?)">/g;
const highlightedFeatureRegex =
/<p><a title="(?<highlightedId>[^"]+)"><\/a> (?<highlightedDescripion>.+)\n\t+<p><img src="(?<highlightedImage>.+?)">/g;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't see an option to prevent this: https://dprint.dev/plugins/typescript/config/

operatorPosition is already set to nextLine but it doesn't affect =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like adding support should be easy: dprint/dprint-plugin-typescript#414

Care to file an issue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

See following comments, I'm ok with the current setup

Comment thread source/globals.d.ts
type Deinit =
| {disconnect: VoidFunction}
| {clear: VoidFunction}
| {destroy: VoidFunction}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Considering this formatting, I think = does look better on the first line

@fregante
Copy link
Copy Markdown
Member Author

I don't see any controversial issues, other than a temporary "formatting .ts but not .tsx"

Let's see how .tsx fares in a followup PR

@fregante fregante merged commit b633a49 into main May 11, 2026
10 checks passed
@fregante fregante deleted the dprint-ts branch May 11, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

2 participants