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 false positives for scientific notation (ex: 9e9) in unit-no-unknown

See original GitHub issue

Clearly describe the bug

no-unit-unknown says Unexpected unknown unit "e9" when parsing a rule like flex-shrink: 9e9

It should eat up the e9 before the unit like the spec says for number-ident

Which rule, if any, is the bug related to?

no-unit-unknown

What CSS is needed to reproduce the bug?

a {
  flex: 0 9e9 auto;
  width: 1e5px;
}

What stylelint configuration is needed to reproduce the bug?

{
  "rules": {
    "no-unit-unknown": "true"
  }
}

Which version of stylelint are you using?

9.1.2

How are you running stylelint: CLI, PostCSS plugin, Node API?

yarn stylelint style.css

Does the bug relate to non-standard syntax (e.g. SCSS, Less etc.)?

No

What did you expect to happen?

No warnings to be flagged.

What actually happened (e.g. what warnings or errors did you get)?

 460:10  ✖  Unexpected unknown unit "e9"   unit-no-unknown

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jeddy3commented, Aug 15, 2018

@chearon Thanks for the report and for using the template.

I’ve not seen that notation used in CSS before. It’s fascinating to see! Anyhow, I’ve raised an issue upstream in the value parser that we use in stylelint. Let’s wait to see whether this bug will be addressed there, or whether we’ll need to accommodate it directly in stylelint.

1reaction
alexander-akaitcommented, Oct 12, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Scientific Notation Converter - Calculator Soup
Enter a number or a decimal number or scientific notation and the calculator converts to scientific notation, e notation, engineering notation, standard form ......
Read more >
Fixing Incorrect Scientific Notation - YouTube
To see all my Chemistry videos, check outhttp://socratic.org/chemistryScientific notation isn't correct unless there's only one non-zero ...
Read more >
Scientific notation examples (video) | Khan Academy
Learn for free about math, art, computer programming, economics, physics, chemistry, biology, medicine, finance, history, and more. Khan Academy is a ...
Read more >
Scientific Notation - Varsity Tutors
Scientific notation is a way to write very large or very small numbers so that they are easier to read and work with....
Read more >
Scientific Notation - George Brown College
Scientific notation is commonly used to represent very large or very small ... If you moved the decimal point to the left, make...
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