-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Suggestion
Copy link
Labels
lang:angularIssues affecting Angular template (not general JS/TS issues used for Angular)Issues affecting Angular template (not general JS/TS issues used for Angular)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Prettier 3.2.2
Playground link
--parser babelInput:
import {Component} from '@angular/core';
@Component({
selector: 'app-root',
template: `Hello`,
styles: `
:host{
color:blue;}
`,
})
export class AppComponent {}Output:
import { Component } from "@angular/core";
@Component({
selector: "app-root",
template: `Hello`,
styles: `
:host{
color:blue;}
`,
})
export class AppComponent {}Expected output:
Why?
Since Angular v17 it is possible to specify an inline style with a single string rather than an array of strings. If specified as array prettier formats the css. If specified as string prettier does nothing with the css.
reduckted and sosukesuzuki
Metadata
Metadata
Assignees
Labels
lang:angularIssues affecting Angular template (not general JS/TS issues used for Angular)Issues affecting Angular template (not general JS/TS issues used for Angular)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.