-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Migrate pretty-format to TypeScript #7809
Conversation
ec66556
to
e707040
Compare
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// @ts-ignore |
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.
Didn't know about this dep until I migrated the tests today. So this is kinda cheating
@@ -0,0 +1,117 @@ | |||
/** |
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 purposefully does not export all the things found in https://github.com/facebook/jest/blob/master/types/PrettyFormat.js
@@ -196,9 +196,7 @@ function compileTypes(packages) { | |||
fs.existsSync(path.resolve(p, 'tsconfig.json')) | |||
); | |||
|
|||
if (packageWithTs.length > 0) { |
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 stuff is not needed now that we have a package migrated
e707040
to
c0331c1
Compare
This looks good to me, I've cloned it and dug around (the editor support is perfect) and I've converted some of the functions docs so they'll show inline and added ESDocs to the exported API. |
Thanks, @orta!
Is this something we can lint for or something like that? |
TSLint does support this (making sure all exported objects have docs) but I'm not sure we want to be adopting TS lint when there's movement back to ESLint for TS I couldn't find something in ESLint to verify that exports have JSDocs |
Oh yeah, I got pretty close to building this feature in ESLint eslint/eslint#7812 - but it was as we were moving to TSLint so I never went back and wrapped it up. |
Ref jsdoc - it seems we should use |
Thanks @milesj! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
The first package in the migration.
Diff in built code (this is bigger than it'd usually be due to the browser-bundle which includes filenames):
Test plan
Green CI