s-leroux / asciidoctor.js-pug

Allow to override the html5 output of asciidoctor.js with pug templates
3 stars 2 forks source link

Use the JavaScript standard style #14

Open ggrossetie opened 6 years ago

ggrossetie commented 6 years ago

I think we should use a linter to enforce a consistent style across the Asciidoctor.js ecosystem. We've settled on the "JavaScript standard style": https://standardjs.com/

And I must admit that I'm really enjoying writing code with this style :yum:

What do you think ?

s-leroux commented 6 years ago

I realize my mail reply does not appear in that thread. So basically, I said "yes".

I notice you made style-related changes as part of https://github.com/s-leroux/asciidoctor.js-pug/pull/13 To avoid making too many different unrelated changes in the same PR, I will first apply the https://standardjs.com/ rules.

ggrossetie commented 6 years ago

No worries, I will revert those.

s-leroux commented 6 years ago

@Mogztter To comply with https://standardjs.com/ I removed all the semi-colons from the sources. But I noticed you still use them in your own code. Did you add an exception for that? Or are you planning to remove all semi-colons too?

FWIW, the AirBNB lint preset would feel more natural to me and with the exception of the semicolon (and dangling coma which I like ;) is quite similar to standardjs. Would that suits you or are you insisting on following "à la lettre" the standardjs rules?

ggrossetie commented 6 years ago

I'm working on it: https://github.com/asciidoctor/asciidoctor.js/issues/493

I will have a look at the Airbnb preset.