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

Add an autofixer for no-floating-decimal #7070

Closed
not-an-aardvark opened this issue Sep 7, 2016 · 3 comments
Closed

Add an autofixer for no-floating-decimal #7070

not-an-aardvark opened this issue Sep 7, 2016 · 3 comments
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 enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules

Comments

@not-an-aardvark
Copy link
Member

I'm using Node v6.5.0 and ESLint v3.4.0.

It would be useful to have an autofix option for the no-floating-decimal rule. This would add a 0 before or after the decimal point in order to fix errors.

var foo = .5;
var bar = 2.;
var baz = -.7;

// gets fixed to:

var foo = 0.5;
var bar = 2.0;
var baz = -0.7;

I would be willing to add this if the issue is accepted.

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Sep 7, 2016
@platinumazure platinumazure added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Sep 7, 2016
@platinumazure
Copy link
Member

👍, sounds good to me.

@mysticatea
Copy link
Member

👍

1 similar comment
@ilyavolodin
Copy link
Member

👍

not-an-aardvark added a commit to not-an-aardvark/eslint that referenced this issue Sep 8, 2016
@nzakas nzakas added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Sep 9, 2016
@nzakas nzakas closed this as completed in cec65e3 Sep 9, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
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 enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

6 participants