Opened on 10/31/2018 at 01:21:46 AM
Last modified on 11/20/2018 at 02:51:44 AM
#7084 new defect
Add no-use-before-define rule to our eslint config
Reported by: | erikvold | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Infrastructure | Keywords: | |
Cc: | sebastian, greiner | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by erikvold)
I'm not sure why we are not using the no-use-before-define in our eslint config.
Attachments (0)
Change History (8)
comment:2 Changed on 10/31/2018 at 01:34:42 AM by erikvold
- Blocking 6833 added
comment:4 Changed on 10/31/2018 at 10:05:13 PM by sebastian
- Blocking 6833 removed
comment:5 in reply to: ↑ 3 Changed on 11/01/2018 at 08:44:09 AM by erikvold
Replying to sebastian:
Will circular dependencies still work with that rule?
function foo() { if (...) bar();
I'm pretty sure this line would break the rule.
We'd just have to add an exception for this pattern when we want to use it, or find an alternative implementation.
comment:6 Changed on 11/02/2018 at 01:06:08 PM by greiner
- Cc greiner added
comment:7 Changed on 11/02/2018 at 01:18:01 PM by agiammarchi
my 2 cents: I think in UI we are very aware of how functions hoisting work so, as long as { "functions": false } is used, I personally wouldn't mind having this rule in.
comment:8 Changed on 11/20/2018 at 02:51:44 AM by sebastian
No objections either from my end, with functions: false.
Note: See
TracTickets for help on using
tickets.
Will circular dependencies still work with that rule?