Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Bugfix/number literal format fix #4856

Merged
merged 2 commits into from
Sep 12, 2019
Merged

Bugfix/number literal format fix #4856

merged 2 commits into from
Sep 12, 2019

Conversation

rgant
Copy link
Contributor

@rgant rgant commented Sep 12, 2019

PR checklist

Overview of change:

The fixer for number-literal-format did not preserve significant zeros in the number. Changed the RegEx so it would better match decimals with leading and internal zeros as they are significant. Still trims trailing (insignificant) zeros.

Is there anything you'd like reviewers to focus on?

For some reason I had to add two blank lines to the end of test/rules/number-literal-format/test.ts.fix I cannot see why that happened.

CHANGELOG.md entry:

[bugfix] Preserve significant zeros in fixer for number-literal-format

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @rgant! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, thanks @rgant!

@JoshuaKGoldberg JoshuaKGoldberg added the PR: waiting for CLA Waiting for the author to sign the CLA label Sep 12, 2019
@rgant
Copy link
Contributor Author

rgant commented Sep 12, 2019

I signed it.

@JoshuaKGoldberg JoshuaKGoldberg merged commit 5cf6e65 into palantir:master Sep 12, 2019
@rgant rgant deleted the bugfix/number-literal-format-fix branch September 12, 2019 13:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR: waiting for CLA Waiting for the author to sign the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

number-literal-format fix strips significant zeros
3 participants