Fix false positives for scientific notation (ex: 9e9) in unit-no-unknown
See original GitHub issueClearly 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:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
Fixed in https://github.com/TrySound/postcss-value-parser/releases/tag/v3.3.1, need add tests and update deps