-
Notifications
You must be signed in to change notification settings - Fork 2
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
Flow editing minor mode - updates & new features #1
Flow editing minor mode - updates & new features #1
Conversation
Extending the change from mooz/js2-mode@97d27d6
Fix visitor and printer properties on rjsx symbols
change: with-eval-after-load 'rjsx to: with-eval-after-load 'rjsx-mode
Update README.md to fix code: "(with-eval-after-load 'rjsx-mode"
Use `buffer-chars-modified-tick` to reparse less
Fix visiting of rjsx-member children
0ccb750
to
f6ac4fa
Compare
This is getting quite ugly with all the state tracking variables. What I fear is that this will just spiral into us having to maintain our own state machine which will eventually blow up exponentially for all the combinations (we can't really use the method flow since we are using advices which are sort of outside of the normal recursion). I'm not quite sure how to address this and if adding more and more flags is the way to go :/ |
This is great, thanks for your work on this @Fuco1! I've renamed |
@eqyiel There actually isn't any dependency on @antifuchs any reasons I'm missing why you decided to extend this package? |
In the vast majority of test cases, we want zero errors and warnings. Then if there are any errors or warnings, it can help to see what they are, so assert that in such a way that failing tests print them.
This lets a user declare flow types on function arguments for now.
(Sadly, we can't easily print them, so we do lose that information. But it's an acceptable loss, I think.)
It's only used for side-effects, there's no arglist node
f6a012a
to
c0441d6
Compare
Oh wow - really nice work, everyone!! I'm sorry if you're running into constraints from my earlier decisions - most of the time it's that I didn't know what the consequences would be (and that I cargo-culted liberally from rjsx-mode directly). If you want to pull this into a separate package, that'd probably be the cleanest solution. I currently have no time to work on this (have an intercontinental move to set up!), but would love if this keeps moving at the speed that you all have kept it at! (-: |
@antifuchs No worries mate! Just one thing, you're OK with me pulling your code into another package right? I think js2-mode cares about attribution so that if we would ever try to include it we should have things sorted out. Good luck with your move, sounds exciting!:) |
Yes, that's absolutely OK - please take this code and organize it as you see fit!! (Also, thanks for the kind wishes - I will need that luck!) (-: |
I've moved all the code along with the history to https://github.com/Fuco1/flow-js2-mode. Feel free to check it out and report issues there! Thanks everyone for the support. |
I'm opening this branch to track some updates to the mode (fixing incompatibilities which originated in some
js2-mode
changes and some additional features.A review would be appreciated :)
Some issues:
{foo: bar}
the type is parsed even thought it is not a type. This breaks fontification and semantics of the object literals. I don't see a way yet to distinguish if thefoo
is a key or a variable.flow-minor-mode
and causes infinite recursion when callingrequire
. We need to rename the file to something else.const valid: bool = ...
fontifiesbool
as variable.import type {Config} from 'types/Config'
does not work.function send(res, {body, content}: Response)
const a = foo ? {} : {}
function<T>
generic constructs.function <T: number>
{| ... |}
return {[fieldName]: item.value}
(error at:
)clients: { [client_id: string]: Client }