Prettier-vscode: respect rule declaration-colon-newline-after

Created on 4 Jan 2018  路  7Comments  路  Source: prettier/prettier-vscode

original css

background: url(http://webapi.amap.com/theme/v1.3/images/newpc/poi-1.png) no-repeat;

formated css

background: url(http://webapi.amap.com/theme/v1.3/images/newpc/poi-1.png)
    no-repeat;

the formatted css does not respect the rule declaration-colon-newline-after: always-multi-line from stylelint-config-standard

image

locked

Most helpful comment

@zyy7259 umm... It may be a temporary solution but I am looking for a way to make it works instead of just turn it off. Let see if others working on it or not .. :(

All 7 comments

@zyy7259 I get the exactly the same issue about this rule, may I know why this question has been closed?

@choi2k add stylelint-config-prettier to the stylelint config file to turns off all rules that are unnecessary or might conflict with Prettier.

PS: it is just like add eslint-config-prettier to the eslint config file to turns off all rules that are unnecessary or might conflict with Prettier (for js).

@zyy7259 umm... It may be a temporary solution but I am looking for a way to make it works instead of just turn it off. Let see if others working on it or not .. :(

@zyy7259 is this issue closed as it wont be fixed?

i've tried extending my config with stylelint-config-prettier config as you suggested, but this still doesn't work - when i run format document the multiline always rule is not respected and all comma separated items are placed on 1 line.

@mike-rotate This issue is closed as I think it's not a problem.

The stylelint-config-prettier config will disable the rule declaration-colon-newline-after

Which means prettier can format the document whatever it likes, and stylelint won't give any warnings or errors about the result.

ah i see - thanks for the reply/info!

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings