Skip to content

Conversation

@jbedard
Copy link
Contributor

@jbedard jbedard commented Aug 23, 2015

This makes master like compat. The test can probably be put into compat as is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var key, at the top.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the top.

We have an example of something like that in the guide https://contribute.jquery.org/style-guide/js/#spacing, but strictly speaking that is not a requirement anymore

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you mean. This is failing because key is missing a declaration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i mean you could do

for ( var key in div[ 0 ] )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for ( var key in div[ 0 ] )

I really don't like this form. :) var is function scoped and we write it outside of any blocks inside a function to not suggest it behaves otherwise.

(i.e. this should be done exactly as this PR does it)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like this form. :)

This is why we have a code-style, i don't like a lot of things in current code base, as i'm sure we all do, but we choose to follow it.

(i.e. this should be done exactly as this PR does it)

No, test should trigger the error with minimum overhead, any other requirements are subjective

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is why we have a code-style

We can codify this, sure, if JSCS can do it. It's just how it is in the whole code base so it's a de-facto standard anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can codify this, sure, if JSCS can do it.

It totally can, it was like that for a while, but code-style changed and rule was removed from the preset. It is like that de-facto because code-style used to force it, but now it doesn't, so we shouldn't ask contributor to do something, that is not documented

@timmywil
Copy link
Member

I like this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional newline is needed

@jbedard jbedard force-pushed the data-create-on-get branch from e736a11 to 1998d20 Compare August 24, 2015 15:36
@jbedard
Copy link
Contributor Author

jbedard commented Aug 24, 2015

Oops. Should be fixed now...

@mgol mgol added this to the 3.0.0 milestone Sep 7, 2015
@mgol mgol added the Data label Sep 7, 2015
@mgol mgol closed this in f5bf9bc Sep 7, 2015
mgol pushed a commit that referenced this pull request Sep 8, 2015
@mgol
Copy link
Member

mgol commented Sep 8, 2015

Landed, thanks. I had to modify the assertion count as the test should invoke only one assertion.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

5 participants