How to make WebStorm format code according to eslint?

后端 未结 6 823
不知归路
不知归路 2021-01-30 10:23

I\'ve specified eslint configuration for my WebStorm project. But it does not seem to apply to code reformat feature. For example, it continues to format import { somethin

6条回答
  •  一向
    一向 (楼主)
    2021-01-30 10:29

    I have just installed WebStorm 2017 and I do not know if this works for WS 2016. Instead of pressing Option + Command + L, to reformat your code, you could press Option + Enter when your cursor is close to an ESLint error. This will open up the context menu, then select the "ESLint: Fix current file"

提交回复
热议问题