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

add bigint type to valid-typeof #9636

Closed
wants to merge 1 commit into from
Closed

Conversation

devsnek
Copy link

@devsnek devsnek commented Nov 18, 2017

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.)?
addition of type

Please provide some example code that this change will affect:

typeof 10n === 'bigint'

What does the rule currently do for this code?
fails

What will the rule do after it's changed?
doesn't fail

What changes did you make? (Give an overview)
added bigint as a valid type for valid-typeof rule, no tests added because most runtimes don't have this implemented yet.

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

@jsf-clabot
Copy link

jsf-clabot commented Nov 18, 2017

CLA assistant check
All committers have signed the CLA.

@ilyavolodin
Copy link
Member

bigint is still a stage 3 proposal and ESLint usually doesn't support anything below stage 4. However in this case, it doesn't really hurt anything, so I'm not sure if it's just easier to add this change in. @eslint/eslint-team thoughts?

@devsnek
Copy link
Author

devsnek commented Nov 18, 2017

v8 already has this implemented (save for a few methods) which is how i ran into this in the first place

@not-an-aardvark
Copy link
Member

Also see #7417, which is a similar case.

I think I'm 👎 for doing this right now, because we don't accept explicit logic for features unless they're stage 4.

@devsnek
Copy link
Author

devsnek commented Nov 18, 2017

i'll bump this when it hits stage 4 then 👍

@aladdin-add aladdin-add added enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules labels Nov 23, 2017
@not-an-aardvark
Copy link
Member

Closing because this isn't stage 4 yet, but feel free to create a new PR when it reaches stage 4.

@devsnek
Copy link
Author

devsnek commented Apr 13, 2018

seeing as chrome 67 has bigint unflagged and node 10 LTS will land with v8 >= 6.7, even though its stage 3 can we not reopen this?

@not-an-aardvark
Copy link
Member

Sorry, we generally don't support features until they reach stage 4. However, you could make a custom rule that works like valid-typeof but accepts comparisons to "bigint".

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jun 8, 2018
@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 Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants