18
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WebStormでES6のJavaScriptコードを扱う

18
Posted at

いつもはTypeScriptでコードを書いているのだけれども、Node.js用のコードやElectronとかならES6で書けるし変換の手間少ないからES6でも良いかーと思って、WebStormでアロー関数やら使ったら、コードフォーマット時にひどいことになって頭を抱えた。

ES5.1
▲ フォーマッターをかけると大変なことになる。

これは辛いと思ってTypeScriptでずっと書いてたのだけども、設定の場所を教えてもらった。

[WebStorm]⇢[Preference]⇢[Language & Frameworks]⇢[JavaScript]⇢[JavaScript Language version]から[ECMAScript 6]を選択する
preference

ES6
▲ コードフォーマッターをかけても壊れずにすんだ。

18
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?