Code: Select all
fn(
{
a: 'foo',
b:
{
c: 'bar'
}
})
Code: Select all
fn(
{
a: 'foo',
b:
{
c: 'bar'
}
})
Objects don't always want the curly brackets on the same line. Your code is valid and you will get the result that you expect. Are you proposing to put the curly bracket on the same line for objects?callumacrae wrote:Well yeah, they're parentheses to mark an object, not a block of code. Objects always want the parentheses on the same line, as this wouldn't make sense:
Code: Select all
fn( { a: 'foo', b: { c: 'bar' } })
Code: Select all
<script>
var test =
{
a: 'foo',
b:
{
c: 'bar'
}
};
console.log(test);
var fn = function() {
return
{
a: 'foo'
}
};
console.log(fn()); // undefined
</script>
I've always worked with first letter capital and ending with a full stop wherever possible.Oleg wrote:How about requiring all sentences in commit messages to begin with a capital letter (unless the first word is a variable or otherwise something that normally begins with lowercase)?
I suppose that requiring proper English grammar is a good idea for uniformity, although sometimes I have used a lowercase letter in the summary (e.g.callumacrae wrote:I've always worked with first letter capital and ending with a full stop wherever possible.Oleg wrote:How about requiring all sentences in commit messages to begin with a capital letter (unless the first word is a variable or otherwise something that normally begins with lowercase)?
[branch] fixed X error in Y.php
) since that didn't look too bad. The purpose of the hard stop and capital letter is to indicate the end of one sentence and the beginning of another. However, in a summary like the one able, neither is needed, imo, since there is only the one sentence.