| Summary: | [Lint] Reduce the size of the annotation for unnecessary else rule | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Curtis Windatt <curtis.windatt.public> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Michael_Rennie |
| Version: | 14.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Since we are moving away from modifying the stock eslint rules (this is a stock rule we simply consume), I am closing this as worksforme. |
function foo(a){ if (a){ return a; } else { return null; } } If you have an unnecessary else after a return, the entire else block is marked with the annotation. This can potentially be a huge number of lines. Besides looking terrible, it can prevent the tooltip from showing up at a readable size (Bug 513331).