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

Disable @typescript-eslint/no-use-before-define rule #405

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

georgekaran
Copy link
Member

Summary

This PR disables the @typescript-eslint/no-use-before-define rule as stated by @marcospassos in another repo:

In JavaScript, prior to ES6, variable and function declarations are hoisted to the top of a scope, so it’s possible to use identifiers before their formal declarations in code. This can be confusing and some believe it is best to always declare variables and functions before using them.

In ES6, block-level bindings (let and const) introduce a “temporal dead zone” where a ReferenceError will be thrown with any attempt to access the variable before its declaration.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@georgekaran georgekaran added the maintenance Housekeeping label Aug 22, 2023
@georgekaran georgekaran self-assigned this Aug 22, 2023
@marcospassos marcospassos merged commit 13fd59b into master Aug 22, 2023
@marcospassos marcospassos deleted the chore/disable-no-use-before-define-rule branch August 22, 2023 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Housekeeping
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants