博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

前端开发日常

Posted on 2022-04-27 09:03  pencilCool  阅读(10)  评论(0编辑  收藏  举报

React

react hooks lint forbiden

// eslint-disable-next-line react-hooks/exhaustive-deps

工具

prettier 格式化 操作

修复https://stackoverflow.com/questions/52586965/why-does-prettier-not-format-code-in-vs-code

Code > Preferences > Settings > Search for "Prettier "

获取cookie 的方法

javascript:(function(){var output={};document.cookie.split(/\s*;\s*/).forEach(function(pair){pair=pair.split(/\s*=\s*/);output[pair[0]]=pair.splice(1).join('=')});var a=window.document.createElement('a');a.href=window.URL.createObjectURL(new Blob([JSON.stringify(output)],{type:'text/json'}));a.download='cookies.json';document.body.appendChild(a);a.click();document.body.removeChild(a)})()