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]: Link to a plugin rule URL is not displayed #415

Closed
1 task done
ybiquitous opened this issue Aug 16, 2022 · 4 comments · Fixed by #416
Closed
1 task done

[Bug]: Link to a plugin rule URL is not displayed #415

ybiquitous opened this issue Aug 16, 2022 · 4 comments · Fixed by #416
Labels
type: bug a problem with a feature or rule

Comments

@ybiquitous
Copy link
Member

How did you encounter this bug?

For example of stylelint-scss, stylelint-scss@4.3.0 has supported rule URLs in metadata.

The URLs are displayed with CLI, while they are not with VSCode. See the screenshots below:

CLI:

image

VSCode:

image


package.json:

{
  "dependencies": {
    "postcss-scss": "4.0.4",
    "stylelint": "14.10.0",
    "stylelint-scss": "4.3.0"
  }
}

Code Snippet

@foo {
}

Stylelint Configuration

module.exports = {
  plugins: ["stylelint-scss"],
  customSyntax: "postcss-scss",
  rules: {
    "block-no-empty": true,
    "scss/at-rule-no-unknown": true,
  },
};

Extension Configuration

Just `.vscode/settings.json`:


{
  "css.validate": false,
  "less.validate": false,
  "scss.validate": false,
  "stylelint.validate": ["css", "scss"]
}

Actual Behaviour

The editor doesn't show links for plugin rules, e.g. scss/at-rule-no-unknown.

Expected Behaviour

The editor should show links for plugin rules with URL.

Logs

No error logs.

Stylelint Version

v14.10.0

vscode-stylelint Version

v1.2.2

Node.js Version

v18.7.0

Operating System

macOS 12.4

Windows Subsystem for Linux

No response

Code of Conduct

  • I agree to follow vscode-stylelint's Code of Conduct
@ybiquitous ybiquitous added the type: bug a problem with a feature or rule label Aug 16, 2022
@ybiquitous
Copy link
Member Author

Related code:

const ruleDocUrl = rules?.[warning.rule]?.meta?.url;

Ref: #375

@ota-meshi
Copy link
Member

@ybiquitous Do you think ruleMetadata can be used to implement it?
stylelint/stylelint#6166

@ybiquitous
Copy link
Member Author

@ota-meshi I don't know much about the vscode-stylelint code, but maybe yes. 👍🏼

@ybiquitous
Copy link
Member Author

@ota-meshi Thank you so much for the rapid release! v1.2.3 works well! 🎉

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug a problem with a feature or rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants