🐳 chore(prettier): 使用prettier格式化样式文件

This commit is contained in:
xuan 2022-12-05 17:19:42 +08:00
parent 8633c266fb
commit 74ea752e46
5 changed files with 23 additions and 2 deletions

10
.prettierrc Normal file
View File

@ -0,0 +1,10 @@
{
"printWidth": 160,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"jsxBracketSameLine": true,
"trailingComma": "all"
}

View File

@ -1,5 +1,4 @@
{
"prettier.enable": false,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
// Set the default
"editor.formatOnSave": true,
@ -20,4 +19,12 @@
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[css]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}

View File

@ -77,6 +77,7 @@
"cross-env": "^7.0.3",
"eslint": "^8.28.0",
"eslint-config-taro": "3.5.8",
"prettier": "^2.8.0",
"react-refresh": "0.14.0",
"stylelint": "14.15.0",
"taro-iconfont-svg": "^1.0.19",

View File

@ -5,11 +5,13 @@
align-items: center;
font-size: 28px;
padding: 12px 0;
.title {
min-width: 140px;
flex: none;
color: #a9a9a9;
}
.desc {
display: flex;
flex-flow: row nowrap;
@ -19,6 +21,7 @@
color: $color_font_one;
}
}
.descText {
@include common_ellipsis(2);
}

View File

@ -10066,7 +10066,7 @@ prettier@^1.14.2:
resolved "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
prettier@^2.7.1:
prettier@^2.7.1, prettier@^2.8.0:
version "2.8.0"
resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9"
integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==