-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(babel-plugin): initial version #16
Conversation
This pull request introduces 50 alerts when merging 9a594f9 into aaf63d8 - view on LGTM.com new alerts:
|
I fixed some of the eslint errors. Normally the remaining ones are due to the test files. Do you know how could I disable the check for these files? |
This pull request introduces 50 alerts when merging fe61505 into 341f1b2 - view on LGTM.com new alerts:
|
Thank you very much for all the efforts made towards making this feature available! I'll try my best to review the code as soon as possible, trying to fix some issues while learning Babel myself 😄 |
This pull request introduces 50 alerts when merging b012344 into 08cc3fd - view on LGTM.com new alerts:
|
Currently, I'm working on multi-page docs before releasing v0.5. After that, I'll be happy to inspect and review these wonderful contributions. In the meantime, I thought about adding proper autocomplete for TypeScript and had the idea that the /* 'treat.d.ts', placed in projects which depend on glaze */
import 'glaze/sx-prop'; // A '.d.ts' file in the glaze package root
// Just the usual from below, as seen in 'packages/example-gatsby':
import { tokens } from './theme.treat';
declare module 'treat/theme' {
type Tokens = typeof tokens;
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Theme extends Tokens {}
} Implementation ideas for
The recommended |
Quite possibly, the
The underlying |
This pull request introduces 50 alerts when merging c0d3d67 into 1f79156 - view on LGTM.com new alerts:
|
This pull request introduces 50 alerts when merging 2421fd4 into 1f79156 - view on LGTM.com new alerts:
|
Fantastic work, thank you so much! 🙌 I would appreciate if you could document the plugin's usage and known caveat inside the readme, linking it to #27. Please let me know if you need any kind of assistance! |
@all-contributors please add @tatchi for code and tests |
I've put up a pull request to add @tatchi! 🎉 |
I got an even better idea for adding the (The work has started at DefinitelyTyped/DefinitelyTyped#44048) |
Required for seamless augmentation of React attributes, in order to add the `sx` prop for any element: kripod/glaze#16 (comment)
* Add glaze to dependenciesWhitelist Required for seamless augmentation of React attributes, in order to add the `sx` prop for any element: kripod/glaze#16 (comment) * Add treat to dependenciesWhitelist
The type definitions are now ready to roll, awaiting to be merged into the DefinitelyTyped repository. Once they are ready, adding |
* Add glaze to dependenciesWhitelist Required for seamless augmentation of React attributes, in order to add the `sx` prop for any element: kripod/glaze#16 (comment) * Add treat to dependenciesWhitelist
My attempt to implement #10. Don't be afraid by all the files, lots of them are actually tests 😅
Don't hesitate if you have any comments, that's the first time I create a babel plugin so there are chances things are not implemented in an idiomatic way.
Let me know also from the tests if something is missing/not working properly. There's still at least one thing that I'm aware of which is not working: if one has already imported the hook using an alias
The plugin will detect that the hook is already imported but won't use the alias to call the hook:
There's a test
importAlias
to should highlight that.