Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 515134

Summary: [Lint] Reduce the size of the annotation for unnecessary else rule
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: JS ToolsAssignee: 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:

Description Curtis Windatt CLA 2017-04-11 14:52:30 EDT
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).
Comment 1 Michael Rennie CLA 2017-05-11 12:12:48 EDT
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.