How to make WebStorm format code according to eslint?

后端 未结 6 832
不知归路
不知归路 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

    If you are using a newer version of WebStorm like me, you can import the ESLint rules into WebStorm by right-clicking on the .eslintrc.js (or other ESLint configuration files) and then click the "Apply ESLint Code Style Rules" option as shown here.

    Do note as the time of writing, you will also need to exclude the indentation of

提交回复
热议问题