ga-wdi-boston / node-api-promises

Other
0 stars 104 forks source link

Follow one .then() syntax #10

Closed payne-chris-r closed 7 years ago

payne-chris-r commented 7 years ago

The example code uses several different .then syntaxes. Use one. Stick to it.

gaand commented 7 years ago

I'm not sure what this means. Is this a formatting issue?

payne-chris-r commented 7 years ago

Yes. Formatting. All should look like this:

doAsyncSomething()
  .then()
  .then()
  .catch()

NOT

doAsyncSomething().then()

OR

doAsyncSomething()
.then()
.catch()
gaand commented 7 years ago

Agreed. @ga-wdi-boston/core without objection?

raq929 commented 7 years ago

Agreed.

raq929 commented 7 years ago

Per @jrhorn424 we need to make this consistent across other repos.

jrhorn424 commented 7 years ago

(props to @raq929 for catching that we were parsing @payne-chris-r's comment differently)

As it currently reads to me, in English, to me:

Formatting for Promise chains should be either flush or indented two spaces, not all on one line.

As it currently reads to @raq929, with correct English (😉):

Formatting for Promise chains should not be all on one line nor flush, but instead indented with two spaces.

Turns out, "nor" versus "or" is a thing.

Fun party game: try to guess whether it was a traumatic English class, or a traumatic formal logic class, which forced me to learn the difference. (<-- good job, me, on parallel construction and favoring "which" over "that")