Atom Question - Default markup .js as JSX [Solved]

HI All,

I use Atom as my ide. All my files are .js - atom keeps making this normal JS, so i have to go to the bottom right and tell it to use JSX highlighting. Its not a big issue, but it is annoying.

Does anyone know how to fix this? Thanks in advance.

Tat

To anyone else who needs this:

  1. Go to Install Packages/Themes and install the file-types package.
  2. Go to Edit -> Config to open your config.cson file. Add in the below.
  3. On refresh, new .js files will be highlighted as JSX.
"file-types":
    js: "source.js.jsx"

Source: here

1 Like