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

[Bug]: Unsure if extension works with stylelint v16

jorisw opened this issue · comments

How did you encounter this bug?

After upgrading stylelint to v16, the Stylelint output in VSCode shows:

The CommonJS Node.js API is deprecated. See https://stylelint.io/migration-guide/to-16
`output` is deprecated. Use `report` or `code` instead.

Link to Minimal Reproducible Example

https://github.com/jorisw/stylelint-repo

Code Snippet

No response

Stylelint Configuration

{
  "ignoreFiles": ["**/*"],
  "overrides": [
    {
      "files": ["**/*.css"],
      "extends": ["stylelint-config-standard", "stylelint-config-prettier"],
      "rules": {}
    }
  ],
  "rules": {
    "selector-class-pattern": null,
    "no-descending-specificity": null
  }
}

Extension Configuration

{
  "stylelint.packageManager": "yarn",
  "stylelint.reportInvalidScopeDisables": true,
  "stylelint.reportNeedlessDisables": true,
  "stylelint.stylelintPath": "node_modules/stylelint/lib/index.cjs",
  "stylelint.validate": ["css", "scss", "postcss"]
}

Actual Behaviour

No file contents are altered if I make a css or css file messy and save the file.

The CommonJS Node.js API is deprecated. See https://stylelint.io/migration-guide/to-16
`output` is deprecated. Use `report` or `code` instead.

Expected Behaviour

Expect saving the file to reformat the file

Logs

[Debug - 9:34:12 a.m.] [language-server:code-action] Received onCodeAction | uri: "file.scss" context: {"diagnostics":[],"only":["source.fixAll.stylelint"]}
[Debug - 9:34:12 a.m.] [language-server] Returning cached options | resource: "file.scss"
[Debug - 9:34:12 a.m.] [language-server:code-action] Creating code actions | only: ["source.fixAll.stylelint"]
[Debug - 9:34:12 a.m.] [language-server:code-action] Creating "source-fix-all" code action
[Debug - 9:34:12 a.m.] [language-server] Returning cached options | resource: "file.scss"
The CommonJS Node.js API is deprecated. See https://stylelint.io/migration-guide/to-16
The CommonJS Node.js API is deprecated. See https://stylelint.io/migration-guide/to-16
[Debug - 9:34:12 a.m.] [language-server] Running Stylelint | options: {"fix":true,"config":{},"ignoreDisables":false,"reportDescriptionlessDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"ignorePath":".stylelintignore","code":"...","codeFilename":"file.scss"}
output is deprecated. Use report or code instead.
[Debug - 9:34:12 a.m.] [language-server] Fixes retrieved | uri: "file.scss" edits: []
[Debug - 9:34:12 a.m.] [language-server:code-action] Returning code actions | actions: []
[Debug - 9:34:12 a.m.] [language-server:formatter] Received onDocumentFormatting | textDocument: {"uri":"file.scss"} options: {"tabSize":2,"insertSpaces":true}
[Debug - 9:34:12 a.m.] [language-server] Returning cached options | resource: "file.scss"
[Debug - 9:34:12 a.m.] [language-server:formatter] Formatting document | uri: "file.scss" linterOptions: {"config":{"rules":{"indentation":[2]}}}
[Debug - 9:34:12 a.m.] [language-server] Returning cached options | resource: "file.scss"
[Debug - 9:34:12 a.m.] [language-server:formatter] Returning fixes | uri: "file.scss" fixes: {}
The CommonJS Node.js API is deprecated. See https://stylelint.io/migration-guide/to-16
The CommonJS Node.js API is deprecated. See https://stylelint.io/migration-guide/to-16
output is deprecated. Use report or code instead.
[Debug - 9:34:12 a.m.] [language-server] Running Stylelint | options: {"config":{},"fix":true,"ignoreDisables":false,"reportDescriptionlessDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"ignorePath":".stylelintignore","code":"...","codeFilename":"file.scss"}
[Debug - 9:34:12 a.m.] [language-server] Fixes retrieved | uri: "file.scss" edits: []

Stylelint Version

v16.0.0

vscode-stylelint Version

v1.3.0

Node.js Version

v18.7.1

Operating System

macOS 14.3.1

Windows Subsystem for Linux

No response

Code of Conduct

  • I agree to follow vscode-stylelint's Code of Conduct