-
Notifications
You must be signed in to change notification settings - Fork 76
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
Support JSX Fragment syntax for jsx-wrap-multiline. #130
Support JSX Fragment syntax for jsx-wrap-multiline. #130
Conversation
Thanks for your interest in palantir/tslint-react, @dmiller9911! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
elementClose: ts.LineAndCharacter, | ||
closingTag?: ts.JsxClosingElement, | ||
) { | ||
attributes = Array.isArray(attributes) ? attributes : attributes.properties; | ||
if (attributes.length === 0) { | ||
const attrs = Array.isArray(attributes) ? attributes : attributes.properties; |
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.
TS 2.6.2 did not like the reassignment of attributes. Setting to a new variable and adding the typing resolved the type checks.
Yes please, feel free to upgrade |
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.
lgtm aside from the suggestion to take this from tsutils
.
@@ -34,6 +34,6 @@ | |||
"path": "^0.12.7", | |||
"tslint": "^5.5.0", | |||
"tslint-language-service": "^0.9.6", | |||
"typescript": "~2.4.2" | |||
"typescript": "~2.6.2" |
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.
👍
Will wait for ajafff/tsutils#17 before updating tsutils. |
85c6931
to
f3d49ee
Compare
@dmiller9911 can you please pull in master to get the new CI setup and required checks? Also enable CI on your branch if you haven't yet. |
Add tests to verify positive and negative cases. Upgrade ts devDependency to 2.6.2.
f3d49ee
to
20ed872
Compare
Fixes #124
Added a check for ts.syntaxKind.JsxFragment in jsx-wrap-multiline. A newer version of
tsutils
has this check as well, but I was unsure of the policy for updating dependencies. If you would rather upgrade I will do that instead.Add tests to verify positive and negative cases. Upgrade ts devDependency to 2.6.2.