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

[JavaScript] syntax-quote broken when flowtype used #1547

Closed
taoeffect opened this issue May 9, 2018 · 2 comments
Closed

[JavaScript] syntax-quote broken when flowtype used #1547

taoeffect opened this issue May 9, 2018 · 2 comments

Comments

@taoeffect
Copy link

taoeffect commented May 9, 2018

Using Sublime 3.1.

screen shot 2018-05-09 at 12 04 08 am

The this at the end of static fromObject (obj, hash): this breaks it.

EDIT: note that JSCustom fixes this

@Thom1729
Copy link
Collaborator

Thom1729 commented May 9, 2018

The core JavaScript syntax does not support Flow type annotations. The core syntax only highlights standard JavaScript, including many experimental standards-track features but excluding nonstandard extensions such as Flow, JSX, and TypeScript.

By supporting Flow annotations, the core syntax would be making an arbitrary choice that could conflict with future standard JavaScript features or with other nonstandard extensions that users could want. In addition, the core syntax would be on the hook to maintain whatever extensions it supported as those extensions evolve.

As the author of JS Custom, it's probably not surprising that I recommend that package for highlighting Flow and JSX. It's built directly on top of the core JavaScript syntax but offers configurable support for various nonstandard extensions. If the core syntax did implement a specific nonstandard type system, that might actually interfere with JS Custom's ability to support alternative systems.

Because the problem you describe is outside the scope of the core JavaScript syntax, this issue should probably be closed. If you have any issues with JS Custom's Flow typing support, please don't hesitate to open an issue.

@taoeffect
Copy link
Author

@Thom1729 sounds reasonable, thank you.

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

No branches or pull requests

2 participants