Skip to content
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

Merged
merged 4 commits into from
Dec 5, 2022

Conversation

JoshuaKGoldberg
Copy link
Owner

PR Checklist

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.

@JoshuaKGoldberg JoshuaKGoldberg requested a review from danvk December 4, 2022 09:26
@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review December 4, 2022 09:26
Copy link
Collaborator

@danvk danvk left a 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.

.eslintrc.json Show resolved Hide resolved
README.md Show resolved Hide resolved
docs/rules/expect.md Outdated Show resolved Hide resolved
docs/rules/expect.md Outdated Show resolved Hide resolved
docs/rules/expect.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
@JoshuaKGoldberg JoshuaKGoldberg requested a review from danvk December 5, 2022 14:20
@@ -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. ✨
Copy link
Collaborator

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).

Copy link
Owner Author

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 👍

docs/rules/expect.md Show resolved Hide resolved
Repository owner deleted a comment from danvk Dec 5, 2022
@JoshuaKGoldberg JoshuaKGoldberg merged commit 168298d into main Dec 5, 2022
@JoshuaKGoldberg JoshuaKGoldberg deleted the docs-refresh branch December 5, 2022 18:28
```

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 -->
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner Author

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!

Copy link

🎉 This is included in version v0.3.0 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Onboard eslint-doc-generator
3 participants