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.

In a project, I apply lint validation in css (scss) codes, but specifically in .vue files (single file component of vue.js).

One of the validations determines that values below 1 need not contain 0 before the point. This validation is called “number-leading-zero” or simply “leading-zero”.

https://stylelint.io/user-guide/rules/number-leading-zero/

The problem is that prettier converts by default all values smaller than 1 to a 0 and more its decimal place.

I need to allow values below 1 to be entered without 0 before the period, conforme o exemplo abaixo:

this is valid:

border: .5px;

this is not valide:

border: 0.5px;

How do I disable automatic conversion to “leading zero” in vscode?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

20reactions
CiGitcommented, Jun 12, 2018
16reactions
CiGitcommented, Aug 6, 2018

This is a Prettier decision. closing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Leading zero - Wikipedia
A leading zero is any 0 digit that comes before the first nonzero digit in a number string in positional notation. ... For...
Read more >
definition of leading zero by Medical dictionary
A zero that precedes a decimal point, e.g., as in “levothyroxine 0.05 mg p.o. daily.” Leading zeros should always be employed when writing...
Read more >
Keeping leading zeros and large numbers - Microsoft Support
Excel automatically removes leading zeros, and converts large numbers to scientific notation, like 1.23E+15, in order to allow formulas and math operations to ......
Read more >
What does LEADING ZERO mean? - Definitions.net
A leading zero is any 0 digit that comes before the first nonzero digit in a number string in positional notation. For example,...
Read more >
What is Leading Zero? - Webopedia
A zero that appears in the leftmost digit(s) of a number. Many programs that display numbers in columns allow you to specify whether...
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