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.

getUnitFromValueNode removed in v14 - no alternative documented

See original GitHub issue

Describe the documentation issue

Hi,

I have recently moved from v13 to v14, and I had a custom stylelint rule that was checking the values of a particular selector.

It essentially did this:

const unit = getUnitFromValueNode(node);

However I can see in v14 stylelint/lib/utils/getUnitFromValueNode does not exist

What solution would you like to see?

There docs that give a clear alternative. How can I do the same as above but in v14? What other functions have been removed?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
atomicrobokidcommented, Aug 17, 2022

Perfect @jeddy3 thank you for the response. I’ve raised it with them so i’ll report back if they have any questions or they resolve the issue.

Thank you all again 😃

1reaction
atomicrobokidcommented, Aug 15, 2022

Hi @ybiquitous - I can see column and endColumn are different values in terminal:

 {
        "line": 8,
        "column": 19,
        "endLine": 8,
        "endColumn": 22,
        "rule": "enforce-grid-base-unit",
        "severity": "error",
        "text": "Unexpected unit \"px\" for property \"margin-right\""
      }

This is using Webstorm, and from what I can see this doesn’t use a plugin, it uses the node_modules stylelint package

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature]: Emit diagnostics for ranges instead of single positions
What are some alternatives to this feature? No ... getUnitFromValueNode removed in v14 - no alternative documented stylelint/stylelint#6256.
Read more >
Last issues related to stylelint/stylelint project
Create the 8-rules plugin (for the ones not yet handled by Prettier). 0 Likes 7 Replies ... getUnitFromValueNode removed in v14 - no...
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