I recently pulled in the latest Laravel 5.3. In the gulp.js
file, there is the newer ES6 arrow function syntax:
elixir(mix => { mix.sass('app.scss') .webpack('app.js'); });
PhpStorm 2016.2 shows this code error on that:
Expression statement is not assignment or call.
Additionally, the code auto-formatter mucks everything up when it encounters this because it sees it as an error.
How do I get PhpStorm to stop showing that as an error?
With PhpStorm, you can develop modern web, mobile, and desktop applications with JavaScript and Node. js. PhpStorm also supports React, Angular, Vue. js, and other frameworks and provides tight integration with various tools for web development.
You can enable experimental ECMAScript features in your browser by going to chrome://flags/#enable-javascript-harmony and enabling the JavaScript Harmony flag. For some features, you may have to use Chrome Canary with the JavaScript Harmony flag enabled.
PHPStorm incorporates all the functionality that WebStorm comes equipped with (CSS, JavaScript HTML), PLUS full-fledged PHP support (and databases support).
Go to Settings > Languages & Frameworks > JavaScript
Then change JavaScript language version
to ECMAScript 6
MacOs: Menu > PhpStorm> Preferences > Languages & Frameworks > JavaScript
and change JavaScript language version to ECMAScript 6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With