-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the newline with object literals bug #1180
Fix the newline with object literals bug #1180
Conversation
tests/lib/rules/jsx-curly-spacing.js
Outdated
code: '<App foo={ {bar:baz} } />;', | ||
options: ['always'], | ||
parserOptions: parserOptions | ||
}, { | ||
code: [ | ||
'<App foo={', | ||
'bar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep this test case as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is identical with the one just below it, so I suggest it stays removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or is there any reason for the duplicated test?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, i didn't realize it was duplicated
tests/lib/rules/jsx-curly-spacing.js
Outdated
}, { | ||
message: 'There should be no newline before \'}\'' | ||
}], | ||
parserOptions: parserOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we support node 4+, all these can just be parserOptions
(only the new examples; we'll change all the rest in their own commit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if having only a part the code conform to the new convention is a good idea, especially since this convention can be applied automatically. How about I make a separate PR which replaces all occurences of parserOptions: parserOptions
with parserOptions
everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that's fine, I suppose.
be836c6
to
1534bdb
Compare
I've rebased this. There's only the unresolved problem of the duplicate test left. |
From comment #857 (comment):