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

react file with .js extension and JavaScript React language doesn't work very well #81

Closed
luisrudge opened this issue Nov 18, 2015 · 16 comments
Assignees

Comments

@luisrudge
Copy link

errors

2015-11-18 16_15_18-view js - cis-v2-frontend - visual studio code
2015-11-18 16_15_32-view js - cis-v2-frontend - visual studio code

.js file with errors

2015-11-18 16_17_12-

.jsx file without errors

image

@lwansbrough
Copy link

I'm also experiencing this issue. Ignoring it for now, but occasionally I run into an actual syntax error that would have been caught if I hadn't trained myself to ignore them! :)

@tgienger
Copy link

I believe this is because static properties, rather any class property declared this way, is an ES7 feature and code doesn't yet have support for it.

Question though, are you guys getting bracket completion when using .jsx extension? I'm not. I don't get auto indent either, so I've been using Sublime when working with React at all lately.

@luisrudge
Copy link
Author

Well, it's an ES7 feature, but it doesn't highlight any errors when you use the .jsx extension..
Also, it's even highlighting the <div> tag so... Something is wrong :D

@lwansbrough
Copy link

As far as I'm concerned this fix should be better support of JSX contained in .jsx files and an addition of the ability to select which file parsing I want to use for each filetype. And yes the ES7 features are a separate issue.

@AndrewRayCode
Copy link

+1 jsx support in .js file extensions is a required feature

@tgienger
Copy link

Is anyone else not getting bracket completion and auto indent with .jsx files?

@dvdzkwsk
Copy link

JSX support in .js files is one of the only things keeping me from using VSCode as my primary editor. +1 for getting some sort of support for this.

@Ben07
Copy link

Ben07 commented Nov 19, 2015

+1.I like this feature.

@builden
Copy link

builden commented Nov 19, 2015

+1 add es7 support

@jednano
Copy link

jednano commented Nov 19, 2015

same issue here

@deathmood
Copy link

@tgienger +1 also have this issue - nor auto indent neither bracket auto close - it is a real pity because when I switch language from javascript react to typescript react or just javascript it all works

@thitemple
Copy link

Same here, it would be good to have jsx support on .js files

@cnjon
Copy link

cnjon commented Nov 20, 2015

+1

@jrieken
Copy link
Member

jrieken commented Nov 20, 2015

Yeah, no proper support for JSX yet. Closing as dope of #140

@vishal18-gupta
Copy link

// Place your settings in this file to overwrite default and user settings.
{
"files.associations": {
"*.js": "javascriptreact"
}
}

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests