2016-10-31更新
webstorm不支持es6語法怎么辦?
webstorm不支持jsx語法怎么辦?
I spent ages trying to fix this. Every solution talks about 'setting options'. I don't know what that means. Finally, I figured it out. You can just include a commented out line at the top of the file /*jshint esversion: 6 */.
//如果jsx語法報錯 在頂部加入
/*jshint esversion: 6 */這段注釋
另外如果提示導入的包報錯,請使用雙引號 "react","antd"
可以參考這篇文章:http://stackoverflow.com/questions/27441803/why-does-jshint-throw-a-warning-if-i-am-using-const (需要翻牆好像。。。)
最后上張效果圖: