Skip to content

Commit

Permalink
upgrade stylelint
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKyun committed Sep 25, 2024
1 parent 374d271 commit fe5c247
Show file tree
Hide file tree
Showing 17 changed files with 188 additions and 140 deletions.
8 changes: 8 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/dist/*
/public/*
public/*
node_modules
bin
obj
dist
*.*
!*.vue
!*.css
!*.scss
5 changes: 4 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export default [
{
files: ['**/*.{js,ts,vue,jsx,tsx}'],
languageOptions: {
globals: { ...globals.browser, ...globals.node },
globals: {
...globals.browser,
...globals.node
},
parser: vueParser,
parserOptions: {
ecmaVersion: 'latest',
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prepare": "husky",
"lint:eslint": "eslint src/**/*.{js,ts,vue,jsx,tsx} --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:stylelint": "stylelint --cache --fix \"src/**/*.{vue,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged --no-stash"
},
"dependencies": {
Expand Down Expand Up @@ -66,9 +66,10 @@
"rollup": "^4.22.4",
"sass": "^1.79.3",
"stylelint": "^16.9.0",
"stylelint-config-recommended": "^14.0.1",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-config-standard-scss": "13.1.0",
"stylelint-order": "^6.0.4",
"tailwindcss": "^3.4.13",
"typescript": "^5.6.2",
Expand Down
74 changes: 68 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ provide('reloadRouter', () => {
</script>

<style lang="scss">
@import '@/styles/index.scss';
@import '@/styles/index';
</style>
5 changes: 2 additions & 3 deletions src/components/menu/IconList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ function load() {
.icon-select-btn {
display: flex;
align-items: center;
justify-content: center;
align-content: center;
place-content: center center;
flex-direction: column;
border: 1px dashed #aaa;
padding: 5px 0;
Expand All @@ -76,7 +75,7 @@ function load() {
}
.icon-select-btn-text {
color: #666666;
color: #666;
}
}
</style>
19 changes: 9 additions & 10 deletions src/components/menu/IconSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,28 +111,27 @@ const onSelect = (item: string) => {
min-width: 24px;
min-height: 24px;
&:hover {
.icon-select-box-cover {
visibility: inherit;
opacity: 1;
}
}
.icon-select-box-cover {
visibility: hidden;
opacity: 0;
display: flex;
position: absolute;
height: 100%;
width: 100%;
color: #bbbbbb;
color: #bbb;
top: 0;
left: 0;
background: #f0f0f0;
z-index: 1003;
align-items: center;
justify-content: center;
align-content: center;
place-content: center center;
}
&:hover {
.icon-select-box-cover {
visibility: inherit;
opacity: 1;
}
}
}
Expand Down
27 changes: 14 additions & 13 deletions src/layout/components/AppTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -425,15 +425,6 @@ function onElementResize() {
overflow: hidden;
padding: 0 14px;
.tabs-card-scroll-item:hover,
.tabs-card-scroll-item.active-item {
border-radius: 10px 10px 0 0;
& + .tabs-card-scroll-item .tabs-card-scroll-item-content {
border-color: #00000000 !important;
}
}
.tabs-card-scroll-item.active-item {
background-color: v-bind(appTabsBgColorActive) !important;
z-index: 103 !important;
Expand Down Expand Up @@ -465,7 +456,9 @@ function onElementResize() {
padding: 0 12px 0 14px;
height: 20px;
border-left: 1px solid #999;
//border-right: 1px solid #999;
// border-right: 1px solid #999;
min-width: 100px;
display: flex;
justify-content: space-between;
Expand All @@ -478,7 +471,7 @@ function onElementResize() {
}
&:first-child .tabs-card-scroll-item-content {
border-color: #00000000;
border-color: #0000;
}
&:last-child .tabs-card-scroll-item-content {
Expand Down Expand Up @@ -521,6 +514,15 @@ function onElementResize() {
}
}
}
.tabs-card-scroll-item:hover,
.tabs-card-scroll-item.active-item {
border-radius: 10px 10px 0 0;
& + .tabs-card-scroll-item .tabs-card-scroll-item-content {
border-color: #0000 !important;
}
}
}
}
Expand All @@ -534,8 +536,7 @@ function onElementResize() {
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
align-content: center;
place-content: center center;
}
}
</style>
6 changes: 3 additions & 3 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@import 'transition/index.scss';
@import './var.scss';
@import './common.scss';
@import 'transition/index';
@import './var';
@import './common';
1 change: 1 addition & 0 deletions src/styles/tailwind.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* @tailwind base; */

@tailwind components;
@tailwind utilities;
4 changes: 2 additions & 2 deletions src/styles/transition/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
}

.expand-transition {
@include transition-default();
@include transition-default;
}

.expand-x-transition {
@include transition-default();
@include transition-default;
}
17 changes: 10 additions & 7 deletions src/styles/transition/index.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@import './base.scss';
@import './fade.scss';
@import './scale.scss';
@import './slide.scss';
@import './scroll.scss';
@import './zoom.scss';
@import './base';
@import './fade';
@import './scale';
@import './slide';
@import './scroll';
@import './zoom';

.collapse-transition {
transition: 0.2s height ease-in-out, 0.2s padding-top ease-in-out, 0.2s padding-bottom ease-in-out;
transition:
0.2s height ease-in-out,
0.2s padding-top ease-in-out,
0.2s padding-bottom ease-in-out;
}
4 changes: 2 additions & 2 deletions src/styles/transition/scale.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.scale-transition {
@include transition-default();
@include transition-default;

&-enter-from,
&-leave,
Expand All @@ -10,7 +10,7 @@
}

.scale-rotate-transition {
@include transition-default();
@include transition-default;

&-enter-from,
&-leave,
Expand Down
Loading

0 comments on commit fe5c247

Please sign in to comment.