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

Feature request: ability to type-check or leverage eslint to verify usage in CI #201

Open
marbemac opened this issue Jul 16, 2021 · 4 comments
Labels
✨ Feature Request Something should be added 🙅 Hold Progress on the issue is stopped

Comments

@marbemac
Copy link

Hi - I was wondering if it might be possible to leverage or build on https://github.com/tw-in-js/typescript-plugin to support running those same checks in a CI type environment? Similar to how one might run lint checks in a PR. Would be reallyy helpful to be able to catch type errors at test step in CI.

@sastan
Copy link
Collaborator

sastan commented Jan 25, 2022

Sorry, it took so long. Great idea!

@sastan sastan added the 💡 Proposal Request for comments label Jan 25, 2022
@marbemac
Copy link
Author

So happy to see the response, thank you! I'm reviving our "migrate to twind poc" branch as we speak, in order to try out the WIP twind v1, looking forward to exploring.

@danielweck
Copy link
Member

Yes, unfortunately Typescript Language Service plugins such as https://github.com/tw-in-js/typescript-plugin are not executed during tsc command line transpilation/typechecking ... they only activate in Visual Studio Code during the editing experience, see: https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin

It would be nice if a Twind "checker" could plug into either Prettier, ESLint, or Stylelint ... although the Typescript Language Service plugin (which will at some point be ported to Twind v1, I imagine) does offer a nice DX, i.e. not just highlighting errors, but also providing auto-completion / "intellisense", as well as rich contextual information popup.

@marbemac
Copy link
Author

I haven't had a chance to investigate how libraries like Stitches provide native TS autocompletions & type checking (that incorporate the custom user defined theme / config no less!), but it is very slick. It's particularly appealing for library authors, so that downstream consumers of a component library etc also get all of that type-checking / autocomplete goodness.

@sastan sastan added ✨ Feature Request Something should be added and removed 💡 Proposal Request for comments labels Jan 27, 2022
@stale stale bot added the 🛑 Abandoned The issue or Pull Request will not be worked on label Nov 18, 2022
@sastan sastan added 🙅 Hold Progress on the issue is stopped and removed 🛑 Abandoned The issue or Pull Request will not be worked on labels Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature Request Something should be added 🙅 Hold Progress on the issue is stopped
Projects
None yet
Development

No branches or pull requests

3 participants