fix: stylelint error (#558)

* fix: stylelint  error

* fix(less): import eroor
This commit is contained in:
liweijie0812 2023-07-11 16:38:05 +08:00 committed by GitHub
parent 0358653f11
commit 151151c354
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 11 deletions

View File

@ -66,6 +66,7 @@
"postcss-less": "^6.0.0", "postcss-less": "^6.0.0",
"prettier": "^2.8.8", "prettier": "^2.8.8",
"stylelint": "~15.10.0", "stylelint": "~15.10.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-order": "~6.0.3", "stylelint-order": "~6.0.3",
"typescript": "~5.1.6", "typescript": "~5.1.6",
"vite": "^4.3.9", "vite": "^4.3.9",

View File

@ -206,7 +206,6 @@ watchEffect(() => {
position: fixed; position: fixed;
bottom: 200px; bottom: 200px;
right: 0; right: 0;
transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1), visibility 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
height: 40px; height: 40px;
width: 40px; width: 40px;
border-radius: 20px 0 0 20px; border-radius: 20px 0 0 20px;
@ -252,9 +251,9 @@ watchEffect(() => {
.setting-group-title { .setting-group-title {
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
margin: 32px 0 24px 0; margin: 32px 0 24px;
text-align: left; text-align: left;
font-family: PingFang SC; font-family: 'PingFang SC', var(--td-font-family);
font-style: normal; font-style: normal;
font-weight: 500; font-weight: 500;
color: var(--td-text-color-primary); color: var(--td-text-color-primary);
@ -283,6 +282,7 @@ watchEffect(() => {
.setting-container { .setting-container {
padding-bottom: 100px; padding-bottom: 100px;
} }
.t-radio-group.t-size-m { .t-radio-group.t-size-m {
min-height: 32px; min-height: 32px;
width: 100%; width: 100%;
@ -306,6 +306,7 @@ watchEffect(() => {
padding: 8px; padding: 8px;
border-radius: var(--td-radius-default); border-radius: var(--td-radius-default);
border: 2px solid var(--td-component-border); border: 2px solid var(--td-component-border);
> .t-radio-button__label { > .t-radio-button__label {
display: inline-flex; display: inline-flex;
} }

View File

@ -27,7 +27,7 @@
text-decoration: none; text-decoration: none;
margin-right: 24px; margin-right: 24px;
cursor: pointer; cursor: pointer;
transition: color 0.2s cubic-bezier(0.38, 0, 0.24, 1); transition: color .2s cubic-bezier(.38, 0, .24, 1);
} }
.left-operation-container, .left-operation-container,
@ -45,7 +45,8 @@
} }
.t-menu--dark .t-menu__operations .t-icon { .t-menu--dark .t-menu__operations .t-icon {
color: rgba(255, 255, 255, 0.55); color: rgba(255, 255, 255, 55%);
&:hover { &:hover {
cursor: pointer; cursor: pointer;
} }
@ -81,6 +82,7 @@
&-layout { &-layout {
height: calc(100vh - var(--td-comp-size-xxxl)); height: calc(100vh - var(--td-comp-size-xxxl));
overflow-y: scroll; overflow-y: scroll;
&-tabs-nav { &-tabs-nav {
max-width: 100%; max-width: 100%;
position: fixed; position: fixed;
@ -127,7 +129,7 @@
top: 0; top: 0;
bottom: 0; bottom: 0;
z-index: 200; z-index: 200;
transition: all 0.3s; transition: all .3s;
min-height: 100%; min-height: 100%;
&-mix { &-mix {
@ -153,6 +155,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
} }
@ -173,19 +176,19 @@
&-logo-normal { &-logo-normal {
color: var(--td-brand-color); color: var(--td-brand-color);
font: var(--td-font-body-large); font: var(--td-font-body-large);
transition: all 0.3s; transition: all .3s;
} }
} }
&-side-nav-placeholder { &-side-nav-placeholder {
flex: 1 1 232px; flex: 1 1 232px;
min-width: 232px; min-width: 232px;
transition: all 0.3s; transition: all .3s;
&-hidden { &-hidden {
flex: 1 1 72px; flex: 1 1 72px;
min-width: 72px; min-width: 72px;
transition: all 0.3s; transition: all .3s;
} }
} }
} }
@ -204,7 +207,7 @@
.version-container { .version-container {
color: var(--td-text-color-primary); color: var(--td-text-color-primary);
opacity: 0.4; opacity: .4;
} }
.t-menu__popup { .t-menu__popup {

View File

@ -1,8 +1,8 @@
// 对部分样式进行重置 // 对部分样式进行重置
body { body {
color: var(--td-text-color-secondary); color: var(--td-text-color-secondary);
font-family: -apple-system, BlinkMacSystemFont, var(--td-font-family);
font: var(--td-font-body-medium); font: var(--td-font-body-medium);
font-family: -apple-system, BlinkMacSystemFont, var(--td-font-family);
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
padding: 0; padding: 0;
margin: 0; margin: 0;

View File

@ -1,6 +1,33 @@
module.exports = { module.exports = {
defaultSeverity: 'error', defaultSeverity: 'error',
extends: ['stylelint-config-standard'], extends: ['stylelint-config-standard'],
rules: {
'no-duplicate-selectors': null,
'number-leading-zero': 'never',
'block-no-empty': null,
'selector-class-pattern': null,
'declaration-block-no-redundant-longhand-properties': [true, { ignoreShorthands: ['/flex/'] }],
'custom-property-pattern': null,
'keyframes-name-pattern': null,
'no-empty-source': null,
'font-family-no-missing-generic-family-keyword': [
true,
{
ignoreFontFamilies: ['PingFangSC-Regular', 'PingFangSC-Medium', 't'],
},
],
'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
'function-url-quotes': null,
'max-line-length': null,
'at-rule-empty-line-before': ['always', { ignore: ['after-comment'] }],
'declaration-colon-newline-after': null,
'no-descending-specificity': null,
'selector-type-no-unknown': null,
'color-function-notation': 'legacy',
'value-keyword-case': null,
'property-no-unknown': [true, { checkPrefixed: true }],
'import-notation': 'string',
},
overrides: [ overrides: [
{ {
files: ['**/*.html', '**/*.vue'], files: ['**/*.html', '**/*.vue'],