title: How to Edit Auto-Formatting Rules for CSS/SCSS/LESS using Prettier in VSCode?
body: <h2>Background:</h2>
  
  <p>I'm using <a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode" rel="noreferrer">Prettier - Code formatter</a> extension for VSCode to auto-format my code on save.</p>
  
  <h2>Problem:</h2>
  
  <p>I'm used to writing single-line blocks in my sass files (where there's only a single property) i.e.</p>
  
  <p><code>.some-class { background: #f00; }</code> </p>
  
  <p>Problem is the <a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode" rel="noreferrer">Prettier</a> extension formats it to multi-lines i.e.</p>
  
  <pre><code>.some-class {
      background: #f00;
  }
  </code></pre>
  
  <p>It seems prettier uses stylelint for css/scss files and I've found these settings can be over-written by enabling this in the settings:</p>
  
  <p><code>"prettier.requireConfig": true</code> and using a <strong>.prettierrc.js</strong> file but haven't been able to turn-off linting for single-line blocks. Would appreciate, if anybody here has any fixes for this.</p>
  
  <p>Thanks</p>
  
  <h2>Update:</h2>
  
  <p>The settings can't be over-written by <code>"prettier.requireConfig": true</code>. The <a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode" rel="noreferrer">Prettier - Code formatter</a> extension for VSCode doesn't have an option to edit stylesheets linting from VSCode Settings.</p>
  
  <p>However, there is an option to enable <a href="https://stylelint.io" rel="noreferrer">stylelint</a> integration but this requires <strong>stylelint</strong> and <strong>stylelint-prettier npm modules</strong>. </p>
  
  <p><a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode" rel="noreferrer">Prettier</a> by default uses <a href="https://github.com/stylelint/stylelint/blob/master/docs/user-guide/rules.md" rel="noreferrer">standard stylelint configuration</a> for stylesheet linting and formatting. </p>
  
  <p><strong>Posted the solution below.</strong></p>