score:227

Accepted answer

Installing babel fixes the syntax highlighting.

Steps to install babel on sublime3:

  1. For windows: Press Ctrl+Shift+P For mac: Cmd+Shift+P
  2. Then type install and select Package control: Install Package
  3. Then type Babel and select 'Babel-Snippets'. It will install babel in few moments.
  4. Then set the Babel syntax in Sublime3 Editor from: View > Syntax > Babel > Javascript

For some users, Babel was missing in step 4. They can additionally install Babel by following the same steps and selecting Babel this time instead of Babel-Snippets in step3.

Check I tested it:

enter image description here

score:-1

I was able to solve this by setting the syntax to JSX. I didn't need to install this plugin.

score:1

1- Go to package control 2- Search for naomi-syntax and install it. 3- Then set the naomi-syntax syntax in Sublime3 Editor from: View > Syntax > naomi-syntax.

score:3

  • Step 1 - Go to Package Control ( ctrl + shift + p)
  • Step 2 - Select install package
  • Step 3 - Search for JSX plugin and install it.
  • Step 4 - Then set the JSX syntax in Sublime3 Editor from: View > Syntax > JSX.

Use filename with .jsx extension

score:4

You need to install babel-sublime plugin.

You can install it from package control of sublime.

Here is the link - https://github.com/babel/babel-sublime


Related Query

More Query from same tag