-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Document enabling Babel syntax highlighting #804
Comments
I would recommend you to include WebStorm/IntelliJ IDEA as a popular editor as well. |
Anyone want to big-up VS Code ? 😕 |
This would be useful on the babel website as well actually. Could be another page for editor support (or we just link it) |
@hzoo If you could provide instructions for contributors as to where to send the PR, I’m happy to point our users to Babel website. |
@gaearon I assume this is the right place -> https://github.com/babel/babel.github.io |
In the meantime, babel-sublime's readme is a good documentation on how to set it up in Sublime Text 3: https://github.com/babel/babel-sublime |
@gaearon sure! Yep it's https://github.com/babel/babel.github.io like @mareksuscak mentioned. I was thinking it could be a separate page for editor integrations but it looks like there is already an entry with webstorm. So maybe we could just add the rest in the same place. This is on the setup page
Will show up in the 2 and 3 steps like |
Yeah that's the question I was thinking about: it's different but I think we could include that in there. Or we can make a new page for it |
If we point CRA users at this page we’ll want a separate place because we don’t want them to enable transpilation in IDE. In fact this has been a source of mistakes before. |
Ok we can just make another page - maybe under https://github.com/babel/babel.github.io/tree/master/docs/usage called syntax-highlighting or something? (should rethink how it's organized) |
I agree with @gaearon. Looking at the menu, the only appropriate place seems to be FAQ at the moment but I'd rather consider adding a new top level link or reorganize one of the top level links to accommodate the Syntax Highlighting guide. |
For Webstorm, if you use create-react-app, from |
Ok babel/website#930 - we can figure out where to put it in another issue (unrelated to this). |
For VSCode: When you open your project for the first time, a light bulb is visible in the status bar. By clicking on it, VSCode creates a {
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules"
]
} See more details here. As VSCode 1.5 is not shipped with TypeScript 2, some syntaxes are detected as errors (i.e. the class properties syntax, included in CRA). To use TypeScript 2 with VSCode 1.5, you need to install TypeScript globally ( See more details here. (TypeScript 2 has been officially released on Sep 22, 2016, so I guess that VSCode 1.6 will be shipped with the new version.) Finally, if you don't want to use the "files.associations": {
"*.js": "javascriptreact"
} |
We should document how to configure editors to support “Babel” syntax scheme (JSX, Flow, ES6) for all
.js
files. The instructions should be added to the user guide and should include popular editors:This issue is up for grabs. If you decide to work on it, please comment here so we don’t duplicate effort. If somebody is already working on it, please give them time and don’t try to submit a PR first.
Thanks!
The text was updated successfully, but these errors were encountered: