| Summary: | [es6] Add rule to detect let in loops | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Muhammad Mousa <mmousa> |
| Component: | JS Tools | Assignee: | Project Inbox <orion.client-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Michael_Rennie |
| Version: | 12.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
This works for me. I'm closing this as worksforme, if you have more information or steps to reproduce, please reopen. |
Provide a rule to throw a warning when accessing a let variable outside of the loop it's declared in. for (let i = 0; i<10; i++) { console.log(i); // 0, 1, 2, 3, 4 ... 9 } console.log(i); // i is not defined