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.

stylelint message not showing interpolated values

See original GitHub issue

I am struggling with message

module.exports = {
  plugins: ["stylelint-declaration-strict-value"],
  rules: {
    "scale-unlimited/declaration-strict-value": [
      ["/color$/", "fill", "stroke"], {
        ignoreVariables:false,
        message: "Custom expected ${types} for \"${value}\" of \"${property}\"",
      }],
  },
};

and this what i see in vscode image

should’nt it show the interpolated values here or am i missing some thing

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
AndyOGocommented, Feb 25, 2021

Thanks, now I understand why you want to have that specific messages.

1reaction
AndyOGocommented, Feb 25, 2021

Thanks for your reply. Glad to hear it works 😃

Keep in mind though that it’s a hacky workaround, wich messes with stylelint’s internals. This should become an official API as part of stylelint https://github.com/stylelint/stylelint/issues/5170


No, that’s not possible as of now. The only options which supports that is ignoreValues, because it needs it.

Why would you need that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix false positives for interpolation in function-no-unknown
When having something like the following, stylelint 's function-no-unknown throws a false error (assuming darken is in ignoreFunctions.
Read more >
Changelog | Stylelint
Fixed: showing of incorrect missing package in customSyntax require handling (#5763). Fixed: color-function-notation false positives for variables and color ...
Read more >
stylelint-scss | Yarn - Package Manager
Dimension. dimension-no-non-numeric-values : Disallow non-numeric values when interpolating a value with a unit. Function. function-color-relative : Encourage ...
Read more >
Running stylelint over custom styled-components template string
Interpolation tagging allows you to construct CSS declarations from dynamic and non-autonomous parts. For example, you can construct a property ...
Read more >
stylelint-config-torchbox - npm
Start using stylelint-config-torchbox in your project by running `npm i ... scss/dollar-variable-no-missing-interpolation ...
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