Fanfou Wiki

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

用户工具

站点工具


prettier

差别

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

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
prettier [2021/10/21 17:28] 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, 
-<file yaml .prettier.yml> +  singleQuote: true, 
-# 单行代码的最大宽度 +  trailingComma: "es5", 
-printWidth: 100 +  arrowParens: "avoid", 
-# 使用单引号而不是双引号 +  overrides: [ 
-singleQuote: false+    { 
 +      files: ["*.html", "*.tsx", "*.vue"], 
 +      options: { 
 +        printWidth: 120, 
 +      }, 
 +    }, 
 +  ], 
 +};
  
-overrides: 
-  - files: "*.html" 
-    options: 
-      printWidth: 120 
-  - files: "*.vue" 
-    options: 
-      printWidth: 120 
-  - files: "*.tsx" 
-    options: 
-      printWidth: 120 
 </file> </file>
  
行 40: 行 37:
 build build
 coverage coverage
- 
-# Ignore all HTML files: 
-*.html 
  
 </file> </file>
行 49: 行 43:
  
 <code bash> <code bash>
-npx prettier --write .+npx prettier --write --ignore-unknown .
 </code> </code>
  
prettier.1634808524.txt.gz · 最后更改: 2021/10/21 17:28 由 admin