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

Add Flow language mode #5920

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add Flow language mode #5920

wants to merge 3 commits into from

Conversation

goodmind
Copy link

@goodmind
Copy link
Author

I also found bug with typeof X in extends clause in TypeScript, so I added failing tests here

@marijnh
Copy link
Member

marijnh commented Jun 27, 2019

Hi, thanks for the contribution. But we aren't including new modes into the main distribution anymore. The recommended way to distribute code like this is to put it into its own npm package with a name like codemirror-mode-flow

@marijnh marijnh closed this Jun 27, 2019
@marijnh
Copy link
Member

marijnh commented Jun 27, 2019

Ah, I see you extended the javascript mode, rather than adding it as a new mode. I'll look into this in more detail next week, though my first thought is that that mode is already way too complex as it is.

@marijnh marijnh reopened this Jun 27, 2019
@marijnh
Copy link
Member

marijnh commented Jul 3, 2019

Though it does add more complexity to an already big mode, this is a very solid PR implementing a useful feature, so I guess I have no choice but to merge it 😄

@marijnh
Copy link
Member

marijnh commented Jul 3, 2019

On closer look, it seems that a lot of the failing tests are not intentional. Could you take care of those first?

@goodmind
Copy link
Author

goodmind commented Jul 3, 2019

There's bug with <Y extends typeof X>(x: Y) <- x becomes variable instead of def that I don't know how to fix
It's in TypeScript mode

@marijnh
Copy link
Member

marijnh commented Jul 3, 2019

Right, but there's a bunch of tests failing that don't use that construct.

@goodmind
Copy link
Author

goodmind commented Jul 3, 2019

You mean with indentation?

@goodmind
Copy link
Author

goodmind commented Jul 3, 2019

I didn't really understand how it works and couldn't make it work for exact objects, so it's really off
image
image

Not sure why regular objects failing
It looks like it's impossible because brackets is single character, not two
image

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.

None yet

2 participants