-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add comment once per generated code block, automatically add (some) necessary imports #17
base: master
Are you sure you want to change the base?
Conversation
18c718e
to
8fa89b5
Compare
@P-Bomb suggested,
I'm not keen on breaking eslint rules, but it seems rude to modify the original code. Perhaps if we annotated the import with a comment indicating that it was generated? |
I don't think it's rude to modify the original code, because these model files exist in order to support the code generation. They go hand-in-hand. I don't think we should add commented-out import statements and I think if we add import statements later in the file, we might break eslint rules, which I think we need to avoid. import statements should go at the top of the file. If we're going to add support for that to this library, they should be added to the top of the file. |
Sorry, I think I wasn't clear. I mean, do something like this... Original:
Post code generation:
|
|
I'm fine with that, although I think the import comments are unnecessary. |
OK; they may be tricky to pull off anyway. So I will concentrate on just getting the imports into the top of the file. I appreciate the feedback! |
6769034
to
b50032f
Compare
Should address #4