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 semicolons after Flow type expressions to restore syntax highlighting #4647

Closed
calcsam opened this issue Mar 21, 2018 · 3 comments
Closed
Labels
good first issue Issue that doesn't require previous experience with Gatsby

Comments

@calcsam
Copy link
Contributor

calcsam commented Mar 21, 2018

Our lack of semicolons on Flow Type expressions like eg type Plugin = { name: string, } (see eg https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/redux/actions.js#L77) causes syntax highlighting to fail in Sublime Text, as documented in babel/babel-sublime#309. If we add semicolons in, highlighting works again.

A couple screenshots from my local environment:

Without semicolon:
image

With semicolon:
image

@calcsam calcsam added the good first issue Issue that doesn't require previous experience with Gatsby label Mar 21, 2018
@KyleAMathews
Copy link
Contributor

We're a semicolon-less repo. Not sure adding semicolons in a handful of spots to workaround a bug in a editor's syntax highlighting makes sense?

@emwalker
Copy link

Since there are repos that do not use semicolons, a better approach would be to fix the syntax highlighting rules for flow, as seen here:

babel/babel-sublime#309 (comment)

@KyleAMathews
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issue that doesn't require previous experience with Gatsby
Projects
None yet
Development

No branches or pull requests

3 participants