Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

astUtils.isDecimalInteger should return true for NonOctalDecimalIntegerLiteral literals #13588

Closed
mdjermanovic opened this issue Aug 18, 2020 · 0 comments · Fixed by #13664
Closed
Assignees
Labels
accepted archived due to age autofix bug rule

Comments

@mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Aug 18, 2020

Tell us about your environment

  • ESLint Version: 7.7.0
  • Node Version: v12.14.0
  • npm Version: v6.13.4

What parser (default, Babel-ESLint, etc.) are you using?

default

Please show your full configuration:

Configuration
module.exports = {
  parserOptions: {
    ecmaVersion: 2015
  }
}

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

Online Demo

/* eslint no-extra-parens: error */

(08).toString();
npx eslint index.js --fix

What did you expect to happen?

No error, because the rule doesn't report errors on other number literals that can be continued with decimal dot.

What actually happened? Please include the actual, raw output from ESLint.

Error and autofix to:

/* eslint no-extra-parens: error */

08.toString();

Error on the fixed code:

  3:4  error  Parsing error: Identifier directly after number

Are you willing to submit a pull request to fix this bug?

Yes, after we merge #13581

@mdjermanovic mdjermanovic added bug rule accepted autofix labels Aug 18, 2020
@mdjermanovic mdjermanovic self-assigned this Aug 18, 2020
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Mar 18, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age label Mar 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted archived due to age autofix bug rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant