Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Formatting is impossible with stylelint #519

Open
1 task done
zxj176381 opened this issue Mar 4, 2024 · 3 comments
Open
1 task done

[Bug]: Formatting is impossible with stylelint #519

zxj176381 opened this issue Mar 4, 2024 · 3 comments

Comments

@zxj176381
Copy link

How did you encounter this bug?

The css\less file is formatted incorrectly: 'output' is deprecated. Use 'report' or 'code' instead.

Link to Minimal Reproducible Example

no

Code Snippet

#root {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;


  // format
  text-align: center;
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}

.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

Stylelint Configuration

{ "extends": ["stylelint-config-standard"] }

Extension Configuration

"[css]": {
    "editor.defaultFormatter": "stylelint.vscode-stylelint",
    "editor.codeActionsOnSave": {
      "source.fixAll.stylelint": "explicit"
    }
  },

Actual Behaviour

Console error when formatting with vscode:
output is deprecated. Use report or code instead.
The CommonJS Node.js API is deprecated. See https://stylelint.io/migration-guide/to-16

Expected Behaviour

Successful formatting

Logs

[Info - 08:52:48] [language-server] Registering module | module: "auto-fix"
[Info - 08:52:48] [language-server] Module registered | module: "auto-fix"
[Info - 08:52:48] [language-server] Registering module | module: "code-action"
[Info - 08:52:48] [language-server] Module registered | module: "code-action"
[Info - 08:52:48] [language-server] Registering module | module: "completion"
[Info - 08:52:48] [language-server] Module registered | module: "completion"
[Info - 08:52:48] [language-server] Registering module | module: "formatter"
[Info - 08:52:48] [language-server] Module registered | module: "formatter"
[Info - 08:52:48] [language-server] Registering module | module: "old-stylelint-warning"
[Info - 08:52:48] [language-server] Module registered | module: "old-stylelint-warning"
[Info - 08:52:48] [language-server] Registering module | module: "validator"
[Info - 08:52:48] [language-server] Module registered | module: "validator"
[Info - 08:52:48] [language-server] Starting language server
[Info - 08:52:48] [language-server] Registering handlers
[Info - 08:52:48] [language-server] Handlers registered
[Info - 08:52:48] [language-server] Language server started
The CommonJS Node.js API is deprecated. See https://stylelint.io/migration-guide/to-16
output is deprecated. Use report or code instead.

Stylelint Version

16.2.1

vscode-stylelint Version

1.3.0

Node.js Version

20.2.0

Operating System

windows 10

Windows Subsystem for Linux

No response

Code of Conduct

  • I agree to follow vscode-stylelint's Code of Conduct
@StfBauer
Copy link

StfBauer commented Apr 2, 2024

Same issue like I still had in this issue: #498

At least NPX stylelint works perfectly for me.

npx stylelint *.scss --fix

@Mouvedia
Copy link
Member

related: #523

@shangxinbo
Copy link

vscode-stylelint Version 1.4.0 still

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants