-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Enable, a basic version of, the ESLint no-use-before-define
rule
#12893
Enable, a basic version of, the ESLint no-use-before-define
rule
#12893
Conversation
/botio lint |
From: Bot.io (Linux m4)ReceivedCommand cmd_lint from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/04f838fa5b5325a/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_lint from @Snuffleupagus received. Current queue size: 0 Live output at: http://3.101.106.178:8877/3f5140f265da1ab/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/04f838fa5b5325a/output.txt Total script time: 2.42 mins
|
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/3f5140f265da1ab/output.txt Total script time: 3.21 mins
|
Maybe we could run at least such checkers on the changed lines in a patch. |
I don't think ESLint is easily able to do that. Anyway, this patch on its own is sufficient to catch the bug. |
Looks good to me with a rebase onto the current master to see if the failure disappears. |
Given how our existing code-base is written, we simply can't (and probably don't want to) enable *all* of this ESLint rule. The reason is that we have a lot of code, especially related to functions, which is fine at runtime but might to a static analyzer *look* like a problem. However, even in its most *basic* version this ESLint rule can help catch some outright bugs; see PR 12891. Please find additional details about the ESLint rule at https://eslint.org/docs/rules/no-use-before-define
18b5355
to
61ceae6
Compare
As expected, it did :-) |
Thank you! |
Given how our existing code-base is written, we simply can't (and probably don't want to) enable all of this ESLint rule. The reason is that we have a lot of code, especially related to functions, which is fine at runtime but might to a static analyzer look like a problem.
However, even in its most basic version this ESLint rule can help catch some outright bugs; see PR #12891.
Please find additional details about the ESLint rule at https://eslint.org/docs/rules/no-use-before-define