score:3

Accepted answer

these errors are reported by jshint linter, not by phpstorm itself. you have to tell jshint that you are using es2015 syntax. this can be done by adding

/*jshint esversion: 6 */

comment to your file (http://jshint.com/docs/options/#esversion), or by specifying


{
  "esversion": 6
}

in .jshintrc file. if you don't have your own config file, you can enable ecmascript.next in relaxing options in settings | languages & frameworks | javascript | code quality tools | jshint

if you didn't mean to use jshint for linting your react application (and i'd say that this linter is a bit outdated and doesn't work well for jsx + es6), just disable it by unchecking enable in settings | languages & frameworks | javascript | code quality tools | jshint


Related Query

More Query from same tag