-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Open
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatterSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
I use "vscode.typescript-language-features" as my default JS/TS formatter, and when formatting long lines, the indentation could be improved.
As an example, this is the resulting code after "vscode.typescript-language-features":
const Label = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
VariantProps<typeof labelVariants> // <= This line isn't sufficiently indented.
>(({ className, ...props }, ref) => (
<LabelPrimitive.Root
className={cn(labelVariants(), className)}
ref={ref}
{...props}
/>
));Please note that the 4th line isn't indented deeper.
What would be visually clearer would be:
const Label = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
VariantProps<typeof labelVariants> // <= This line indented deeper.
>(({ className, ...props }, ref) => (
<LabelPrimitive.Root
className={cn(labelVariants(), className)}
ref={ref}
{...props}
/>
));Is there a way to wrap them in a way that the result looks like the second snippet?
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatterSuggestionAn idea for TypeScriptAn idea for TypeScript