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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
ts-migration/index #372
ts-migration/index #372
Conversation
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.
see inline comment
This fails locally due to #371 not being merged. Can land after that's done 馃檪 |
haha yeah I saw that - I'm doing that right now. |
Ah yeah, |
d9a5789
to
0b922f3
Compare
Woops... 馃槄 I was about to amend the "bad" commit message, but now that you've pushed, I'll leave it to you if that's ok. Once this has been merged would you mind rebasing #363 for me? I did it locally, but something weird happened and it decided to not apply the change to I can do it if you're not got the time :) |
|
||
return rules; | ||
}, | ||
(rules, key) => ({ ...rules, [`jest/${key}`]: 'error' }), |
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 is actually surprisingly "slow" vs using an assignment, b/c everytime you're creating a new object & copying all the keys.
It's by far not a big deal, and even less so since we're doing it the once (I hope? I assume the way eslint runs it typically reuses the same node process), but it's an interesting little fact.
(That might have changed in later versions of node - iirc I last tested this on node8)
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.
doing it once during require
, yeah - probably not even measurable except in micro benchmarks. Nothing compared to the FS operations in the same file 馃檪
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.
and yeah, object spread has gotten way quicker (although it's currently transpiled down by babel until we drop node 6)
https://twitter.com/bmeurer/status/1015105293301280768?lang=en
Rebased #363 now. I think I did it right 馃槢 |
馃帀 This PR is included in version 22.15.0 馃帀 The release is available on: Your semantic-release bot 馃摝馃殌 |
That's the syntax for |
I wrote a custom babel plugin for it in jest: https://github.com/facebook/jest/blob/master/scripts/babel-plugin-jest-replace-ts-export-assignment.js |
oohhhohhh exciting! My company does investment time (but are not thoughtbot 馃槈) every Friday (which is tomorrow), so I'll explore that plugin, and look about adding it at some point :D |
Feel free to rip it out, publish it, and send a PR to jest migrating to using the published version 馃檪 |
Sure thing :D |
chore(index): convert to typescript.
Might as well break this out too 馃槀