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

Error not recognised in vscode

AprildreamMI opened this issue · comments

commented

What steps are needed to reproduce the bug?

  1. npm init stylelint
  2. Create layout.css file
.text * { top: calc(1em+ 2em);}

a{}

h1 {
  background-size: 0,0;
}

What Stylelint configuration is needed to reproduce the bug?

{
  "extends": [
    "stylelint-config-standard"
  ],
  "rules": {
    "value-list-comma-space-after": "always"
  }
}

How did you run Stylelint?

vscode

Which version of Stylelint are you using?

15.4.0

What did you expect to happen?

{
  "name": "stylelint-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "stylelint": "^15.4.0",
    "stylelint-config-standard": "^32.0.0"
  }
}

What actually happened?

Error not recognised in vscode(1.77.0), no red wavy line

Does the bug relate to non-standard syntax?

no

Proposal to fix the bug

No response

commented

image
image

commented

Found the reason, it's so strange that "stylelint.config": {} cannot exist in vscode's settings file

# settings.json
{
"stylelint.config": {}
}

The presence of this line will disable stylelint, but why this line is generated is completely beyond me

Hi @AprildreamMI, I've transferred this issue to the VSCode extension repository (from the main one).

For what it's worth, I'm not able to reproduce your example from a brand-new VSCode installation (ex download VSCode -> install plugin -> run npm init stylelint -- nothing is produced in the config for me / it works as intended). Is it possible that you've previously changed the setting?