The multiline declaration is on the src
property. Looks like prettier wants this:
@font-face {
font-family: 'Encode Sans Condensed';
src:
url('/pf/resources/fonts/EncodeSansCondensed/EncodeSansCondensed-Thin.ttf')
format('truetype');
font-weight: 200;
font-style: normal;
}
But you could do this instead:
@font-face {
font-family: 'Encode Sans Condensed';
src: url('/pf/resources/fonts/EncodeSansCondensed/EncodeSansCondensed-Thin.ttf') format('truetype');
font-weight: 200;
font-style: normal;
}
It may be that your linter is creating formatting incompatible prettier's configuration. Eg: if using stylelint:
npm install --save-dev stylelint-config-prettier
Then, append stylelint-config-prettier
to the "extends"
array in your .stylelintrc.* file
. Make sure to put it last, so it will override other configs.
{
"extends": [
// other configs ...
"stylelint-config-prettier"
]
}
Source: https://github.com/prettier/stylelint-config-prettier