stylelint / vscode-stylelint

The official Visual Studio Code extension for Stylelint

Home Page:https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected option value "false" for rule "no-eol-whitespace"

rchl opened this issue · comments

When the client triggers document formatting with the trimTrailingWhitespace option set to false, for example:

textDocument/formatting(3):
{
  "textDocument": {
    "uri": "file:///usr/local/workspace/temp/Website/src/styles/style.css"
  },
  "workDoneToken": "wd3",
  "options": {
    "insertFinalNewline": true,
    "trimTrailingWhitespace": false,
    "trimFinalNewlines": true,
    "tabSize": 4,
    "insertSpaces": false
  }
}

then the server adds reference to the no-eol-whitespace rule with value false in here:

if (insertFinalNewline !== undefined) {
rules['no-missing-end-of-source-newline'] = insertFinalNewline;
}

But value false is invalid and triggers:

Unexpected option value "false" for rule "no-eol-whitespace"

It needs to be null to disable the rule.