Enable unicorn/prefer-number-coercion rule (#19374)
This commit is contained in:
1 parent
81e5eac947
commit
7f1f8a7cd8
2 files changed
+3
-3
No files matched your search
@@ -330,7 +330,6 @@ const configs = [
|
||||
"unicorn/no-useless-template-literals": "off",
|
||||
"unicorn/no-global-object-property-assignment": "off",
|
||||
"unicorn/prefer-await": "off",
|
||||
"unicorn/prefer-number-coercion": "off",
|
||||
"unicorn/no-top-level-side-effects": "off",
|
||||
"unicorn/no-return-array-push": "off",
|
||||
"unicorn/prefer-array-from-map": "off",
|
||||
|
||||
@@ -45,7 +45,6 @@ export function NumberInput(
|
||||
{ label: _label, title, value, min, max, step },
|
||||
{ emit },
|
||||
) {
|
||||
const onChange = (value) => emit("change", value);
|
||||
return (
|
||||
<label title={title}>
|
||||
{_label}{" "}
|
||||
@@ -55,7 +54,9 @@ export function NumberInput(
|
||||
max={max}
|
||||
step={step}
|
||||
value={value}
|
||||
onChange={(ev) => onChange(Number.parseInt(ev.target.value, 10))}
|
||||
onChange={(ev) => {
|
||||
emit("change", Number(ev.target.value));
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user