Setup in webstorm eslint and pretter
I understood correctly that in webstorm eslint and pretter are configured to be consistent and it is enough to enable them in the settings so that the code is formatted at a high level of standards. And doesn't require manual tuning?
请先登录再写评论。
Webstorm doesn't do anything special here, it just passes the configuration files (
.eslintrc
, .prettierrc
) to the corresponding tools. You have to set up both tools to make sure that no conflicts are there. I'd suggest following the official recipes at https://prettier.io/docs/en/integrating-with-linters.html, namely, use the eslint-config-prettier to turn the conflicting ESLint rules off, and then set up Prettier as your default code formatter in Settings | Languages & Frameworks | JavaScript | Prettier