Prettier 3.2.2
Playground link
Input:
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.
Prettier 3.2.2
Playground link
Input:
Output:
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.