stylefmt icon indicating copy to clipboard operation
stylefmt copied to clipboard

Incorrect Quotation in SCSS @functions

Open a-coox opened this issue 7 years ago • 1 comments

Environment Visual Studio Code 1.28.1

Actual Behavior string-quotes: single is set in my stylelintrc file. Most code is auto-formatted correctly, except for in SCSS functions, where @warn, @error, and @debug directives are formatted to double quotes. This then logs as an error with stylelint.

Expected Behavior Formatting with stylefmt should consistently change this code to single quotes.

Steps to Reproduce

  1. Create a new project with the following .stylelintrc file: { "rules": { "string-quotes": "single" } }

  2. Add the following scss file to the project: @function temp() { @warn 'This is a warning'; @error 'This is an error'; }

  3. Trigger a stylefmt format, either through format on save or right click > format. This will format into the following: @function temp() { @warn "This is a warning"; @error "This is an error"; }

Thanks for your help!

a-coox avatar Oct 15 '18 00:10 a-coox

Hey @Belgiumese, this has been fixed in my active fork. Also feel free to use my version of vscode-stylefmt. 👍

ronilaukkarinen avatar Oct 21 '20 04:10 ronilaukkarinen