简体   繁体   中英

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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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