-
Notifications
You must be signed in to change notification settings - Fork 5
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
docs: refreshed docs and onboarded eslint-doc-generator #67
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.
Thanks, Josh! Main suggestion is to keep some examples in README.md
, to more quickly answer the "what the hell is this?" question for people coming in w/o much context.
@@ -1,6 +1,17 @@ | |||
# eslint-plugin-expect-type | |||
|
|||
ESLint plugin with $ExpectType and $ExpectError type assertions | |||
> ESLint plugin with `^?` Twoslash, `$ExpectError`, and `$ExpectType` type assertions. ✨ |
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 be in a separate PR, but it would be helpful to include some background on why you might want to do type assertions (testing types) and specifically why you might want to do them in this way (string matching avoids vagaries of assignability and lets you test the display of types).
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.
Yeah a good idea. Linking here to #50 👍
``` | ||
|
||
By running `eslint` snapshot type will be matched with actual type and Error will be emitted in case types don't match. | ||
<!-- prettier-ignore-start --> |
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.
In case you wanted to avoid disabling prettier for this, there are a couple ways to solve this in:
Example:
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.
Ah thanks! I'll probably leave this as is for a bit, since it's less config for now. But this is good to know!
🎉 This is included in version v0.3.0 🎉 The release is available on: Cheers! 📦🚀 |
PR Checklist
status: accepting prs
Overview
Brings in https://github.com/bmish/eslint-doc-generator and generally rewrites the
expect-type/expect
rule's docs to be clear.Trims down the README.md by delegating configuration information to https://typescript-eslint.io/docs. Updates the list of
### References
to be current peers.Updates all devDependencies to the latest.