jshint/jshint — Issue #454: grouping via parens confuses jshint
Author: Gozala
Created: 2012-02-12 22:53:18+00:00
State: open

Following snippet of code really confuses jshint logging incorrect errors:

```js
/*jshint asi: true */
/*globals protocol */
var sequence = protocol({
first: ('Returns first item of this sequence', [ 'this' ]),
rest: ('Returns sequence of items after the first', [ 'this' ]),
stick: ('Returns sequence of items where head is first, and this is rest', [ 'head', 'this' ])
})
```

```
Errors:

Line 4: first: ('Returns first item of this sequence', [ 'this' ]),

Expected ')' to match '(' from line 4 and instead saw ','.

Line 4: first: ('Returns first item of this sequence', [ 'this' ]),

Expected '}' to match '{' from line 3 and instead saw ')'.

Line 5: rest: ('Returns sequence of items after the first', [ 'this' ]),

Expected ')' and instead saw ':'.

Line 6: stick: ('Returns sequence of items where head is first, and this is rest', [ 'head', 'this' ])

Expected '(end)' and instead saw ':'.

Line 5: rest: ('Returns sequence of items after the first', [ 'this' ]),

'rest' is not defined.
```

Would be very nice to fix this or have an option to suppress these warnings.