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
New: object-curly-newline
(fixes #6072)
#6223
Conversation
LGTM |
By analyzing the blame information on this pull request, we identified @nzakas, @scriptdaemon and @pedrottimark to be potential reviewers |
6169b9d
to
b96c9a9
Compare
LGTM |
}] = obj; | ||
``` | ||
|
||
## When Not To Use It |
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 you add a section for compatibility?
Compatibility
- JSCS: rule name
Note for all: this is equivalent to the JSCS rule http://jscs.info/rule/requirePaddingNewLinesInObjects |
b96c9a9
to
c34a6b3
Compare
LGTM |
Ugh, now I'm aware that So... this rule should check it. |
Does this make sense for imports or exports? Maybe we should leave it out unless people ask for it? |
c34a6b3
to
2fc444c
Compare
LGTM |
Hm, my reason is only consistency, so leaving it out is OK to me. Original JSCS rule doesn't handle imports and exports. |
* `{multiline: true}` (default) - requires line breaks if there are line breaks inside properties or between properties. Otherwise, disallows line breaks. | ||
* `{minProperties: <integer>}` - requires line breaks if the number of properties is more than the given integer. Otherwise, disallows line breaks. | ||
|
||
And `multiline` and `minProperties` can be combinated. |
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.
Combinated -> combined
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.
Thank you. I fixed it.
2fc444c
to
af52010
Compare
LGTM |
Lgtm |
Why don't you check the file linebreak style before you add '\n' in the fixer
|
@onemen If you have |
I know that. |
@onemen Not only |
Fixes #6072 (and #6205).
The issue has not been accepted yet, but I made this PR for a reference.
I'd like to see feedback, then if it can do, I'd like to add
accepted
label.