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

Rule: don't use NaN, undefined or Infinity as variable name (declaration) or function argument #371

Closed
DavidBruant opened this issue Nov 12, 2013 · 4 comments · Fixed by #421
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 rule Relates to ESLint's core rules

Comments

@DavidBruant
Copy link
Contributor

Per spec, NaN, undefined or Infinity can be used as function argument name or re-declared locally. But it's just always confusing and there is no good reason to do so. Ideally, they should have had their keyword reserved (as null does), but the language didn't turn out this way.

@michaelficarra
Copy link
Member

Working on this. Anyone have any suggestions for what I should call the rule?

edit: For now, I'm calling it no-shadow-es5-15.1.1.

@vendethiel
Copy link

no_reassign_keyword ? (or backwards)

@DavidBruant
Copy link
Contributor Author

Maybe a name that suggests that these should have been reserved keywords in the first place.
Maybe something like: opiniated-keywords or regretted-unreserved-keywords?

@nzakas
Copy link
Member

nzakas commented Nov 29, 2013

@DavidBruant lol. Those sound like country songs.

michaelficarra added a commit to michaelficarra/eslint that referenced this issue Nov 29, 2013
michaelficarra added a commit to michaelficarra/eslint that referenced this issue Nov 29, 2013
michaelficarra added a commit to michaelficarra/eslint that referenced this issue Nov 29, 2013
nzakas added a commit that referenced this issue Nov 29, 2013
fixes #371: add no-shadow-es5-15.1.1 rule
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 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 Feb 7, 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 rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants