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

This commit is contained in:
xuan 2022-12-05 17:22:54 +08:00
parent 54337b65d6
commit 544c790431
6 changed files with 81 additions and 57 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"
}

10
.vscode/settings.json vendored
View File

@ -1,5 +1,7 @@
{
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
// Set the default
"editor.formatOnSave": true,
// Enable per-language
"[javascript]": {
"editor.formatOnSave": true,
@ -17,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

@ -75,6 +75,7 @@
"cross-env": "^7.0.3",
"eslint": "^8.29.0",
"eslint-config-taro": "3.5.8",
"prettier": "^2.8.0",
"react-refresh": "0.14.0",
"stylelint": "14.16.0",
"typescript": "^4.9.3",

View File

@ -1,6 +1,5 @@
@import './styles/common.scss';
@import './styles/iconfont.scss';
page{
height: 100%;
}
page {
height: 100%;
}

View File

@ -1,59 +1,58 @@
.address_main{
width: 100%;
box-sizing: border-box;
.address_title{
.address_main {
width: 100%;
box-sizing: border-box;
.address_title {
display: flex;
justify-content: space-between;
font-size: $font_size;
padding: 20px;
padding-bottom: 0;
}
.address_select {
display: flex;
padding: 30px 0;
margin-top: 10px;
font-size: $font_size_medium;
border-bottom: 1px solid #eaeaea;
color: $color_font_two;
position: relative;
.address_item {
padding: 0 20px;
max-width: 200px;
@include common_ellipsis();
}
.bottom_index {
width: 100px;
height: 2px;
border-radius: 50px;
background-color: $color_main;
position: absolute;
bottom: 0;
left: 0;
transition: left 0.1s;
}
}
.address_scroll {
height: 600px;
.address_scroll_list {
padding: 0 20px;
font-size: $font_size;
.address_list_item {
padding: 20px 0;
display: flex;
justify-content: space-between;
font-size: $font_size;
padding: 20px;
padding-bottom: 0;
}
.address_select{
display: flex;
padding: 30px 0;
margin-top: 10px;
font-size: $font_size_medium;
border-bottom: 1px solid #eaeaea;
color: $color_font_two;
position: relative;
.address_item{
padding: 0 20px;
max-width: 200px;
@include common_ellipsis()
align-items: center;
.address_list_item_name {
@include common_ellipsis();
}
.bottom_index{
width: 100px;
height: 2px;
border-radius: 50px;
background-color:$color_main;
position: absolute;
bottom: 0;
left: 0;
transition: left 0.1s;
.address_iconfont {
font-size: 30px !important;
color: $color_main;
}
}
}
.address_scroll{
height: 600px;
.address_scroll_list{
padding: 0 20px;
font-size: $font_size;
.address_list_item{
padding: 20px 0;
display: flex;
justify-content: space-between;
align-items: center;
.address_list_item_name{
@include common_ellipsis()
}
.address_iconfont{
font-size: 30px !important;
color: $color_main;
}
}
}
}
.addresst_select{
color:$color_font_one;
}
}
.addresst_select {
color: $color_font_one;
}
}

View File

@ -10977,6 +10977,11 @@ prepend-http@^2.0.0:
resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==
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==
pretty-bytes@^5.3.0:
version "5.6.0"
resolved "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"