The declaration spanning multiple lines is present on the src
property. It appears that prettier prefers the following format:
@font-face {
font-family: 'Encode Sans Condensed';
src:
url('/pf/resources/fonts/EncodeSansCondensed/EncodeSansCondensed-Thin.ttf')
format('truetype');
font-weight: 200;
font-style: normal;
}
Alternatively, you can opt for this structure:
@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 is possible that your linter's formatting conflicts with prettier's settings. For example, if using stylelint:
npm install --save-dev stylelint-config-prettier
Afterwards, add stylelint-config-prettier
to the "extends"
array in your .stylelintrc.* file
. Ensure it is placed last to take precedence over other configurations.
{
"extends": [
// other configs ...
"stylelint-config-prettier"
]
}
Source: https://github.com/prettier/stylelint-config-prettier