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 no-use-before-define #22

Closed
amannn opened this issue Apr 26, 2019 · 1 comment · Fixed by #25
Closed

Add no-use-before-define #22

amannn opened this issue Apr 26, 2019 · 1 comment · Fixed by #25

Comments

@amannn
Copy link
Member

amannn commented Apr 26, 2019

This can be tricky: A variable defined with const can be compiled via Babel to a regular var and therefore a violation of this rule might not throw in a browser. However if this code isn't compiled and run directly with modern tools where const is natively supported, a ReferenceError will be thrown.

https://eslint.org/docs/rules/no-use-before-define

@amannn
Copy link
Member Author

amannn commented Jun 15, 2019

However, allow the hoisting of function as this can be convenient.

amannn added a commit that referenced this issue Jul 31, 2019
- Resolves #19
- Resolves #20
- Resolves #21
- Resolves #22
- Resolves #23
- Sort rules alphabetically
@amannn amannn closed this as completed in #25 Aug 2, 2019
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 a pull request may close this issue.

1 participant