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

Bug 430332

Summary: [eslint] new-parens rule gives false warning on whitespace after constructor
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: JS ToolsAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2014-03-13 18:27:49 EDT
I noticed the new-parens rule generates this warning on textView.js:

> this._setSelection(new Selection (0, 0, false), true);
                         ^^^^^^^^^ 
                         "Missing parentheses invoking constructor"

I expected this to pass with no warnings.

FWIW, the implementation of new-parens from ESLint master behaves as I expected on this input.
Comment 1 Michael Rennie CLA 2014-03-14 10:09:19 EDT
This is a bug in the version of eslint we use. Specifically this one: https://github.com/eslint/eslint/commit/06c43726b936d9bf796f15e3358ff73d928f0bf8

This issue is fixed in version 0.4.2, which we are waiting to update to in bug 429724
Comment 2 Michael Rennie CLA 2014-04-03 14:12:17 EDT
With the fix for bug 429724 this issue is resolved. Marking worksforme.