pugjs / pug-lint

An unopinionated and configurable linter and style checker for Pug
ISC License
228 stars 51 forks source link

["DISALLOWMULTIPLELINEBREAKS"] thrown on inline object blocks. #58

Closed scottyeck closed 8 years ago

scottyeck commented 8 years ago

When an object literal is declared to pass options to a mixin, the DISALLOWMULTIPLELINEBREAKS error is thrown. This can be demonstrated with the following:

+dummyMixin({
    a: 'foo',
    b: 'bar'
})

Note, however, that this only occurs when the object definition involves multiple keys (and therefore multiple lines), as the following code passes error-free:

+dummyMixin({
    a: 'foo'
})

Is this intentional?

FWIW, I've demonstrated this in a failing test as requested in the contributing guidelines. I wasn't sure how you'd prefer I organize the fixture file, but you get the idea.

benedfit commented 8 years ago

Hi @scottyeck

Thanks for bringing this to my attention, and thanks for the PR, I'll get this fix released as soon as I can