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

Update: support "bigint" in valid-typeof rule #11802

Merged
merged 2 commits into from Jun 8, 2019

Conversation

Projects
None yet
5 participants
@cjihrig
Copy link
Contributor

commented Jun 4, 2019

BigInt just moved to Stage 4, so add support for it to the valid-typeof rule.

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

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

What rule do you want to change?
valid-typeof

Does this change cause the rule to produce more or fewer warnings?
fewer

How will the change be implemented? (New option, new default behavior, etc.)?
A new valid typeof value, 'bigint', is added.

Please provide some example code that this change will affect:

if (typeof foo === 'bigint') {
  console.log('bigint');
}

What does the rule currently do for this code?
Reports an error.

What will the rule do after it's changed?
Accept bigint as a valid typeof value.

What changes did you make? (Give an overview)
Added a new typeof value to the rule, test, and docs.

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

@eslint eslint bot added the triage label Jun 4, 2019

Show resolved Hide resolved docs/rules/valid-typeof.md Outdated
Update: support "bigint" in valid-typeof rule
BigInt just moved to Stage 4, so add support for it to
the valid-typeof rule.

@mysticatea mysticatea added accepted and removed evaluating labels Jun 4, 2019

Docs: add Further Reading to valid-typeof rule
This commit adds a Further Reading section to the
valid-typeof rule documentation.

@cjihrig cjihrig force-pushed the cjihrig:bigint branch from cefbb2d to c67c5cc Jun 4, 2019

@aladdin-add
Copy link
Member

left a comment

LGTM, thanks!

@platinumazure
Copy link
Member

left a comment

LGTM, thanks!

@platinumazure platinumazure requested a review from ilyavolodin Jun 8, 2019

@ilyavolodin ilyavolodin merged commit e4ab053 into eslint:master Jun 8, 2019

5 checks passed

commit-message PR title follows commit message guidelines
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details

@cjihrig cjihrig deleted the cjihrig:bigint branch Jun 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.