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

Bug 437565

Summary: [eslint] "unreachable code" error is not necessary on EmptyStatements
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: JS ToolsAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 5.0   
Target Milestone: 6.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2014-06-16 17:58:41 EDT
1. Create a js file containing this code, and save it:

function f() {
    return;;
}

2. The 2nd semicolon ends up with 2 problems:
> "Extra semicolon" (ok)
> "Unreachable code." (unexpected)

The unreachable warning is not helpful here, and obscures the real problem (the extra semicolon).
Comment 1 Mark Macdonald CLA 2014-06-16 18:09:32 EDT
the trivial fix
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=239607d