question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule Proposal: prefer-numeric-literals

See original GitHub issue

From requireNumericLiterals.

This rule will disallow parseInt with a constant value as the favor of numeric literals.

{
    "prefer-numeric-literals": "error"
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
hzoocommented, Jul 23, 2016

I can probably take this one (made the JSCS rule originally)

1reaction
hzoocommented, Sep 1, 2016

@azhang496 said she would take this (I’m guiding/helping)

Read more comments on GitHub >

github_iconTop Results From Across the Web

prefer-numeric-literals - ESLint - Pluggable JavaScript Linter
This rule disallows calls to parseInt() or Number.parseInt() if called with two arguments: a string; and a radix option of 2 (binary), 8...
Read more >
Proposal: Go 2 Number Literal Changes
We propose four related changes to number literals in Go: Add binary integer literals, as in 0b101. Add alternate octal integer literals, as...
Read more >
[Returned for Revision] SE-0354: Regex Literals - Swift Forums
Hi everyone, The review of SE-0354: Regex Literals ran from April 28 to May 10. The core team has decided to return the...
Read more >
PEP 515 – Underscores in Numeric Literals
The current proposal is to allow one underscore between digits, and after base specifiers in numeric literals. The underscores have no semantic meaning, ......
Read more >
Google JavaScript Style Guide
5 Language features: 5.1 Local variable declarations: 5.2 Array literals ... Like other programming style guides, the issues covered span not only aesthetic ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found