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 There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion autofix This change is related to ESLint's autofixing capabilities bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@mdjermanovic
Copy link
Member

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 ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion autofix This change is related to ESLint's autofixing capabilities 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 This issue has been archived; please open a new issue for any further discussion label Mar 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion autofix This change is related to ESLint's autofixing capabilities bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant