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

Bugfix/number literal format fix#4856

Merged
JoshuaKGoldberg merged 2 commits into
palantir:masterfrom
rgant:bugfix/number-literal-format-fix
Sep 12, 2019
Merged

Bugfix/number literal format fix#4856
JoshuaKGoldberg merged 2 commits into
palantir:masterfrom
rgant:bugfix/number-literal-format-fix

Conversation

@rgant

@rgant rgant commented Sep 12, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Copy link
Copy Markdown
Contributor

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

rgant commented Sep 12, 2019

Copy link
Copy Markdown
Contributor Author

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