I'm using NuxtJS CLI, which comes together with Prettier and ESLint.
I have problems with hexadecimal numbers:
0xffffff
ESLint doesn't like it and throws this error:
Invalid number literal casing unicorn/number-literal-case
I found this solution, but it didn't work for some reason.
Now I want to disable this rule at all to move forward with my project.
I tried this rule into .eslintsrc.js:
'prefer-numeric-literals': 'off',
That solved 50% of errors, but some ESLint "unicorn" is still causing the error. I tried to uninstall this dependency - but it won't go away.
I also tried to write hexadecimal numbers in uppercase, but prettier transforms it to lowercase on save.
The single option is to write code in this way:
/* eslint-disable */
object.material.color.set(Math.random() * 0xffffff)
/* eslint-enable */
But this is not convenient...
Is there a way to fix it?
- Prettier version: 2.4.0
- ESLint version: 7.3.2