prettier

How to make prettier break all union types?

萝らか妹 提交于 2020-12-13 04:33:17
问题 I want this: type SomeType = Variant1 | Variant2 to always format into this: type SomeType = | Variant1 | Variant2 No matter whether it overflows the specified column width or not. 回答1: If you need that degree of control over formatting you're likely not the target audience for Prettier because such things are intentionally not configurable in it. See Prettier's option philosophy. That said, you still can achieve what you want by creating a fork or a plugin. 来源: https://stackoverflow.com

How to disable prettier settings creating new line of > of html tag?

妖精的绣舞 提交于 2020-12-01 09:13:15
问题 I walk through the Prettier extension of Vscode and I can't find how to disable this scenario. See the > of html tag. Here's a sample code that needed some fix, every time i run the Prettier. The output is this: <tag-html [val1]="valueStr" [val2]="valueStr" > </tag-html> I want Prettier to output: <tag-html [val1]="valueStr" [val2]="valueStr"> </tag-html> 回答1: This can be done with help of VS Code itself. Place the following entry in your workspace settings in your vs code. "html.format

How to disable prettier settings creating new line of > of html tag?

一笑奈何 提交于 2020-12-01 09:13:13
问题 I walk through the Prettier extension of Vscode and I can't find how to disable this scenario. See the > of html tag. Here's a sample code that needed some fix, every time i run the Prettier. The output is this: <tag-html [val1]="valueStr" [val2]="valueStr" > </tag-html> I want Prettier to output: <tag-html [val1]="valueStr" [val2]="valueStr"> </tag-html> 回答1: This can be done with help of VS Code itself. Place the following entry in your workspace settings in your vs code. "html.format

How to disable prettier settings creating new line of > of html tag?

 ̄綄美尐妖づ 提交于 2020-12-01 09:12:31
问题 I walk through the Prettier extension of Vscode and I can't find how to disable this scenario. See the > of html tag. Here's a sample code that needed some fix, every time i run the Prettier. The output is this: <tag-html [val1]="valueStr" [val2]="valueStr" > </tag-html> I want Prettier to output: <tag-html [val1]="valueStr" [val2]="valueStr"> </tag-html> 回答1: This can be done with help of VS Code itself. Place the following entry in your workspace settings in your vs code. "html.format

How to disable prettier settings creating new line of > of html tag?

时光总嘲笑我的痴心妄想 提交于 2020-12-01 09:12:24
问题 I walk through the Prettier extension of Vscode and I can't find how to disable this scenario. See the > of html tag. Here's a sample code that needed some fix, every time i run the Prettier. The output is this: <tag-html [val1]="valueStr" [val2]="valueStr" > </tag-html> I want Prettier to output: <tag-html [val1]="valueStr" [val2]="valueStr"> </tag-html> 回答1: This can be done with help of VS Code itself. Place the following entry in your workspace settings in your vs code. "html.format

记一次给 vue 3.x 搭建脚手架遇到的问题之组件编写

匆匆过客 提交于 2020-11-12 11:56:15
劳动节就好好在家写代码了,毕竟我们现在居家就是在为国家做贡献,而且劳动节不劳动和咸鱼有什么区别,手动🐶保命。 前言 vue 3 刚出几个月,现在是一步一个坑,但是坑还是要填的,毕竟生活还是要继续的么。 目前 vue 3.x 基本上是已经可以工作了,刚出不久的那段时间还看👀到掘金上有人说生产上有 3.x ,对这种大佬只能佩服,毕竟新东西出来,光是想想出了问题,这么解决就是非常头疼的事情 比如我现在搭个脚手架基本就是一路爬过来的,还好目前还没开始深入开发,出的都是周边配套和类型这些小问题。 另外说和 react 很像的,我只能说,这不光是像,你们的代码估计都可以拷过来改改就能用了呢,看下完整的函数式组件的代码 不过 vue 的双向数据绑定用的很舒服,这个才是最主要的,毕竟手写 set 真的麻烦。 读书人的事情这么能叫抄呢?这叫借鉴,这叫共同进步 --- by 鲁迅 不过这种事情其实说多了也没意义,比如 python 和 js 或其他语言之间,你敢说没有互相借鉴。 而且前端的口号不就是:“走别人的路,让别人无路可走”,我们要团结一致,毕竟前端这个岗位真的很容易被替代掉,我们求发展,求稳定,技术人用实力说话,才能让这个岗位越走越远。 目前的脚手架的开发进度 基本上已经可以支持你跑,但是打包工具还在纠结,我喜欢 rollupjs,但是项目已经引入了 webpack,到底要不要再引一个新的