-
-
Notifications
You must be signed in to change notification settings - Fork 421
Closed
Labels
Description
Description
I would appreciate a flag or option to disallow the use of a separator for numbers.
Fail
const n = 10_000Pass
const n = 10000Proposed rule name
numeric-separators-style
Additional Info
To avoid adding a new flag it could be achieved using a negative (exact -1) value:
{
"unicorn/number-literal-case": ["error", -1],
}{
"unicorn/number-literal-case": {
hexadecimal: -1,
binary: -1,
octal: -1,
number: -1,
},
}{
"unicorn/number-literal-case": {
hexadecimal: {minimumDigits: -1},
binary: {minimumDigits: -1},
octal: {minimumDigits: -1},
number: {minimumDigits: -1},
},
}sindresorhus and fregante