Skip to content

Number: Refactor formatter to extract lots of variables#484

Closed
jzaefferer wants to merge 1 commit intoglobalizejs:masterfrom
jzaefferer:mini-validate-refactor
Closed

Number: Refactor formatter to extract lots of variables#484
jzaefferer wants to merge 1 commit intoglobalizejs:masterfrom
jzaefferer:mini-validate-refactor

Conversation

@jzaefferer
Copy link
Contributor

@rxaviers
Copy link
Member

@jzaefferer thanks for your change.

Although I'm not against the change, I didn't understand its value? All variables are still there, although they have been moved into a different function.

@jzaefferer
Copy link
Contributor Author

It makes the formatter function easier to understand, since there's a lot less variables in its scope.

@scottgonzalez
Copy link
Contributor

Seems good.

@jzaefferer jzaefferer force-pushed the mini-validate-refactor branch from 2578089 to a88793d Compare August 24, 2015 13:41
@jzaefferer
Copy link
Contributor Author

Rebased.

Copy link
Member

Choose a reason for hiding this comment

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

Coding style now allows onevar: false, which I personally like too. Although, the rest of the code still uses onevar: true. For consistency sake, I suggest this to be updated to onevar: true until #413 lands.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We've been doing gradual migrations elsewhere. I see no point introducing new code with the old style just for consistency. Anything new shouldn't use onevar is easy enough to apply.

Copy link
Member

Choose a reason for hiding this comment

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

Where?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Well, the examples are from different projects. I wouldn't encourage having inconsistent code.

If it helps, feel free to cherry-pick rxaviers@26f7e10.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't really mind, feel free to land this with your fixup commit.

@rxaviers
Copy link
Member

I left one comment above. Other than that, let's get it landed. Thanks.

rxaviers pushed a commit that referenced this pull request Jan 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants