question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix URL metadata for plugins

See original GitHub issue

What steps are needed to reproduce the bug?

I reproduced the question in many Plugins Libraries, such as stylelint-z-index-value-constraintstylelint-scss and so on.

Next, take stylelint-scss as an example:

step1: npm i stylelint-scss in my project;

step2: creat an test file called test.less;

fill it with:(from stylelint-scss/ selector-no-redundant-nesting-selector’s testFile) called test.less step3: .stylelintrc.js

module.exports = { plugins: [ "stylelint-scss", ], rules: { "scss/selector-no-redundant-nesting-selector": true, }, }; step4: it give me error tips: ‘Unnecessary nesting selector (&) (scss/selector-no-redundant-nesting-selector)Stylelint(scss/selector-no-redundant-nesting-selector)’

But, Stylelint(scss/selector-no-redundant-nesting-selector) had no url.

What Stylelint configuration is needed to reproduce the bug?

module.exports = { plugins: [ “stylelint-scss”, ], rules: { “scss/selector-no-redundant-nesting-selector”: true, }, };

How did you run Stylelint?

cli

Which version of Stylelint are you using?

“stylelint”: “^14.9.1”,“stylelint-scss”: “^4.3.0”

What did you expect to happen?

I click the error tips “…Stylelint(scss/selector-no-redundant-nesting-selector)”

and I can open the web URL which was set in the library.

What actually happened?

I clicked and I can‘t open the web Url which was set in the library.

Does the bug relate to non-standard syntax?

No response

Proposal to fix the bug

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Reda011commented, Aug 17, 2022

I updated stylelint’s version to 14.10.0, and it worked in my custom plugins library.

Thank you(@ybiquitous @jeddy3 ).

1reaction
ybiquitouscommented, Aug 8, 2022

@Reda011 Thanks for opening the issue and using the template.

This behavior seems to be due to the mismatch between our doc and code on exporting rules.

The doc instructs using multiple module.exports,

https://github.com/stylelint/stylelint/blob/e424be5eca77c5532b13147c4a7dad14085a4276/docs/developer-guide/plugins.md?plain=1#L53-L55

but the built-in rules are using a single module.exports:

https://github.com/stylelint/stylelint/blob/e424be5eca77c5532b13147c4a7dad14085a4276/lib/rules/alpha-value-notation/index.js#L203-L206

I think we should make it work in both cases. Maybe, we may need to fix the following code:

https://github.com/stylelint/stylelint/blob/b013ac0827fede2547ba478e920956ff5739af8e/lib/lintPostcssResult.js#L100


I’ve labeled the issue as ready to implement. Please consider contributing if you have time.

There are steps on how to fix a bug in a rule in the Developer guide.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix website and vcs urls in plugin metadata (!1) · Merge requests ...
Fix website and vcs urls in plugin metadata · Review changes · Check out branch · Download · Email patches · Plain diff....
Read more >
Tainacan URL Metadata Type - Plugins - WordPress.org
An extra metadata type plugin for Tainacan, which allows creating metadata that displays an embed URL, such as YouTube, Instagram or Flickr.
Read more >
Plugin: Links Metadata - Joplin Forum
I created a plugin that displays the metadata from all the links present on the note. This plugin displays the website URL, the...
Read more >
sanity-plugin-url-metadata-input - npm
URL input for Sanity that retrieves metadata (title, description) along with OpenGraph information. Latest version: 1.1.0, last published: a ...
Read more >
How to Add Meta Tags in WordPress | WP Engine®
Manually adding the necessary HTML tags to your header.php file is simple, but the tags will not be retained if you change your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found