1 Star 0 Fork 1

赵梓宇 / nodebestpractices

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
eslint_prettier.russian.md 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
Alexander Ivanov 提交于 2019-07-17 08:46 . Russian. codestylepractices

Использование ESLint и Prettier

Сравнение ESLint и Prettier

Если вы отформатируете код ниже с помощью ESLint, он просто выдаст вам предупреждение, что он слишком широкий (зависит от настроек max-len). Prettier же автоматически отформатирует его для вас.

foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne(), noWayYouGottaBeKiddingMe());
foo(
  reallyLongArg(),
  omgSoManyParameters(),
  IShouldRefactorThis(),
  isThereSeriouslyAnotherOne(),
  noWayYouGottaBeKiddingMe()
);

Source: https://github.com/prettier/prettier-eslint/issues/101

Интеграция ESLint и Prettier

ESLint и Prettier перекрываются в функции форматирования кода, но могут быть легко объединены с помощью других пакетов, таких как prettier-eslint, eslint-plugin-prettier, и eslint-config-prettier. Для получения дополнительной информации об их различиях вы можете просмотреть ссылку здесь.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhao-ziyu/nodebestpractices.git
git@gitee.com:zhao-ziyu/nodebestpractices.git
zhao-ziyu
nodebestpractices
nodebestpractices
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891