Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hexadecimal number formatting #104

Open
markknol opened this issue Oct 20, 2023 · 3 comments
Open

Hexadecimal number formatting #104

markknol opened this issue Oct 20, 2023 · 3 comments

Comments

@markknol
Copy link
Contributor

When I write a nice color in code like 0xFF0000, prettier converts this to 0xff_00_00.
This is inconvenient because you can't copy this value back to photoshop or somewhere else which accepts hexadecimal colors. Can we turn this off?

@ThaNarie
Copy link
Member

It's likely it's from the numeric-separators-style eslint rule instead:
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md

It can be turned of for hexadecimal by setting onlyIfContainsSeparator: true in that config object, while leaving it enabled for other number types.

@leroykorterink
Copy link
Collaborator

On it 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants