简体   繁体   English

如何禁用更漂亮的某些规则

[英]How to disable certain rules in prettier

I upgraded prettier v to 2.14 from 1.x and would like to disable certain rules in prettier v2 like for ex I would want the following code:我将 prettier v 从 1.x 升级到 2.14,并希望禁用 prettier v2 中的某些规则,例如我想要以下代码:

useEffect(() => {
    loadMoreHandler();
}, [loadMoreHandler]);

to be like:像是:

useEffect(
  () => {
      loadMoreHandler();
  },
  [loadMoreHandler]
);

Well you better just dig into it, it's not all that hard.好吧,你最好深入研究一下,这并不难。 Here is the link webpage you are looking for.这是您正在寻找的链接网页。

https://prettier.io/docs/en/configuration.html https://prettier.io/docs/en/configuration.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM