Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbe opinionated about dot chaining indentation #974
Comments
This comment has been minimized.
This comment has been minimized.
|
also in favour of if you later decide to add a newline before a dot, you don't have to change indentation of its innards. as in: expect(a).toEqual({
type: 'tears',
number: 96
})becomes: expect(a)
.toEqual({
type: 'tears',
number: 96
})rather than expect(a)
.toEqual({
type: 'tears',
number: 96
}) |
This comment has been minimized.
This comment has been minimized.
tunnckoCore
commented
Aug 14, 2017
•
|
use prettier, period. :D Standard is linter, not formatter (not always true). |
This comment has been minimized.
This comment has been minimized.
|
i mean, sure, but
this is now some code style that i am bikeshedding about. there are plenty of formatting rules in standard. including that the dot should be on the same line as the property. as well as i mean, you know this, there's no need for me to repeat them here.
there are projects on which i can't use prettier but i would still not like to think about these things
i'll see what i can do about getting the tech lead to allow me to set up prettier, but the last time i reformatted the entire project he took it thick. (i understand you said "not always true", and i understand your suggestion is probably quite a good one, but it doesn't help me much right now) (but thank you)
|
This comment has been minimized.
This comment has been minimized.
chee
closed this
Sep 18, 2017
This comment has been minimized.
This comment has been minimized.
|
thanks, tim |
chee commentedAug 14, 2017
and perhaps
?:indentation.currently, this is accepted by
standard(1):which
really this came up because i wasn't sure whether to:
or:
and depending on the particulars of what i'm writing one seems better than the other, but that has left me with some inconsistency in the codebase.
ahas the upside of the closing braces ending up at the same indentation as the original target of the operationbhas the upside of sometimes feeling righti'm sure i can learn to live with either should this project suggest one