LoginSignup
13
8

More than 5 years have passed since last update.

JetBrainsのIDEにESLintルールを適用してリフォーマットするTips

Last updated at Posted at 2018-10-02

.eslintrc.js に記述されているルールをJetBrainsのIDEにインポートして、その設定を使ってリフォーマット(問題を解決)します。

  • .eslintrc.jsの右クリックメニューから、"Apply ESLint Code Style Rules"を選択して設定を取り込みます

apply.png

  • 取り込んだ後に、適当なコンポーネントなどのファイル上で右クリックして、"Fix ESLint Problems"を選ぶとESLintの設定に沿ってファイルがリフォーマットされるようになります

fix.png

  • "Fix ESLint Problems"にKeymapから適当なショートカットキーを割り当てて、リフォーマットできるようにします

keymap.png


参考:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000058150-ESLint-in-Vue-components

13
8
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
13
8