Navigation Menu

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

Fix: Replace Infinity with Number.MAX_SAFE_INTEGER (fixes #13427) #13435

Merged
merged 1 commit into from Jun 23, 2020

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Jun 22, 2020

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

When cloning a rule's config, if Infinity is found, it will be replaced with Number.MAX_SAFE_INTEGER. This should result in the same effective config while preserving serialization.

Note: This only fixes the issue introduced in v7.3.0. Configs using Infinity will still fail in other areas (like caching and --print-config).

We can remove this change once eslint-config-airbnb updates their config.

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

@nzakas nzakas added bug ESLint is working incorrectly accepted There is consensus among the team that this change meets the criteria for inclusion labels Jun 22, 2020
@btmills btmills added the patch candidate This issue may necessitate a patch release in the next few days label Jun 22, 2020
Copy link
Member

@btmills btmills left a comment

Choose a reason for hiding this comment

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

LGTM. Will give others some time to review before merging and doing a patch release.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM!

@mdjermanovic mdjermanovic linked an issue Jun 22, 2020 that may be closed by this pull request
@btmills btmills merged commit de77c11 into master Jun 23, 2020
@btmills btmills deleted the issue13427 branch June 23, 2020 02:26
chalkygames123 added a commit to chalkygames123/front-end-template that referenced this pull request Jun 23, 2020
aladdin-add added a commit that referenced this pull request Jun 30, 2020
kaicataldo pushed a commit that referenced this pull request Jul 3, 2020
* Revert "Fix: Replace Infinity with Number.MAX_SAFE_INTEGER (fixes #13427) (#13435)"

This reverts commit de77c11.

* Revert "Fix: clone config before validating (fixes #12592) (#13034)"

This reverts commit 7fb45cf.
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Dec 21, 2020
@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 Dec 21, 2020
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 bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config clone before validating kills Object data (7.3.0)
6 participants