UNPKG

@masknet/eslint-plugin

Version:
35 lines (22 loc) 501 B
<!-- begin title --> # `@masknet/type/no-number-constructor` Disallow use `Number` constructor <!-- end title --> ## Rule Details ### :x: Incorrect ```ts Number(input); ``` ### :white_check_mark: Correct ```ts Number.parseInt(input); Number.parseFloat(input); ``` ## Attributes <!-- begin attributes --> - [x] :white_check_mark: Recommended - [ ] :wrench: Fixable - [ ] :bulb: Suggestions - [ ] :gear: Configurable - [ ] :thought_balloon: Requires type information <!-- end attributes -->