Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Stylelint gives a prettier error and reduces all CSS to one line #19

Closed
khrome83 opened this issue Apr 21, 2019 · 1 comment
Closed

Comments

@khrome83
Copy link

What version of stylelint, prettier and stylelint-prettier are you using?

prettier - 1.17.0
stylelint - 10.0.1
styelint-prettier - 1.0.6
stylelint-config-prettier - 5.1.0

Please paste any applicable config files that you're using (e.g. .prettierrc or .stylelintrc files)

{
  "extends": ["stylelint-prettier/recommended"],
  "ignoreFiles": [
    "dist/**",
    "**/*.json",
    "**/*.ico"
  ]
}

What source code are you linting?

Original

<style scoped>
.header {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.cards {
  display: flex;
  flex-wrap: wrap;
}
</style>

What did you expect to happen?

Lint normally without reducing all CSS to one line.

What actually happened?

Output

<style scoped>
.header { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .cards
{ display: flex; flex-wrap: wrap; }
</style>
components/Card.vue
 19:9  ✖  Replace                                                                                                                                          prettier/prettier
          "␍⏎··font-family:·"Segoe·UI",·Tahoma,·Geneva,·Verdana,·sans-serif;␍⏎··padding:·1rem;␍⏎··display:·block;␍⏎··margin:·0.25rem;␍⏎··border:·0.                         
          25rem·solid·gainsboro;␍⏎}␍" with                                                                                                                                  
          "·font-family:·"Segoe·UI",·Tahoma,·Geneva,·Verdana,·sans-serif;·padding:⏎1rem;·display:·block;·margin:·0.25rem;·border:·0.                                        
          25rem·solid·gainsboro;·}"                                                                                                                                         

components/NewUser.vue
 41:12  ✖  Delete "⏎·"                                                                                                                                     prettier/prettier
 43:1   ✖  Replace "··padding:·1rem;⏎··margin:·0.25rem;⏎··border:·0.25rem·solid·gainsboro;⏎" with                                                          prettier/prettier
           "padding:·1rem;·margin:·0.25rem;·border:·0.25rem·solid·gainsboro;·"                                                                                              

components/UserRow.vue
 20:9  ✖  Replace                                                                                                                                          prettier/prettier
          "␍⏎··font-family:·"Segoe·UI",·Tahoma,·Geneva,·Verdana,·sans-serif;␍⏎··padding:·1rem;␍⏎··margin:·0.25rem;␍⏎··border:·0.25rem·solid·gainsboro;                      
          ␍⏎}␍" with "·font-family:·"Segoe·UI",·Tahoma,·Geneva,·Verdana,·sans-serif;·padding:⏎1rem;·margin:·0.25rem;·border:·0.25rem·solid·gainsboro;·}"                    

components/VideoPreview.vue
 31:17  ✖  Replace "⏎··width:·31.25rem;⏎··height:·23.4375;⏎··background-color:·#666;⏎" with "·width:·31.25rem;·height:·23.4375;·background-color:·#666;·"  prettier/prettier

pages/index.vue
 42:10  ✖  Replace "⏎··font-family:·"Segoe·UI",·Tahoma,·Geneva,·Verdana,·sans-serif;⏎}⏎⏎.cards·{⏎··display:·flex;⏎··flex-wrap:·wrap;⏎" with                prettier/prettier
           "·font-family:·"Segoe·UI",·Tahoma,·Geneva,·Verdana,·sans-serif;·}·.cards⏎{·display:·flex;·flex-wrap:·wrap;·"
@BPScott
Copy link
Member

BPScott commented May 7, 2019

This sounds like a duplicate of #18. I'm going to close this so we can focus the conversation in there.

@BPScott BPScott closed this as completed May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants