Fanfou Wiki

我等采石之人,当心怀建造大教堂之愿景。

用户工具

站点工具


prettier

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
prettier [2021/10/21 17:35] adminprettier [2021/11/08 18:02] (当前版本) admin
行 11: 行 11:
   * https://prettier.io/docs/en/options.html   * https://prettier.io/docs/en/options.html
  
-<code bash+<file javascript .prettierrc.js
-echo {} > .prettierrc.yml +module.exports = { 
-</code>+  // https://github.com/google/gts/blob/main/.prettierrc.json 
 +  bracketSpacing: false, 
 +  singleQuote: true, 
 +  trailingComma: "es5", 
 +  arrowParens: "avoid", 
 +  overrides: [ 
 +    { 
 +      files: ["*.html", "*.tsx", "*.vue"], 
 +      options: { 
 +        printWidth: 120, 
 +      }, 
 +    }, 
 +  ], 
 +};
  
-<file yaml .prettier.yml> 
-# 单行代码的最大宽度 
-printWidth: 100 
-# 使用单引号而不是双引号 
-singleQuote: false 
- 
-overrides: 
-  - files: 
-      - "*.html" 
-      - "*.vue" 
-      - "*.tsx" 
-    options: 
-      printWidth: 120 
 </file> </file>
  
prettier.1634808911.txt.gz · 最后更改: 2021/10/21 17:35 由 admin