From 8f7f4cab42d5ba077db403aeb960713cf97ff151 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Mon, 8 Jan 2024 00:41:11 +0800 Subject: [PATCH] style: lint fix --- docs/.vuepress/theme.ts | 12 +- eslint.config.js | 3 + .../src/client/clientConfig.ts | 2 +- .../client/styles/{button.scss => button.css} | 0 stylelint.config.js | 2 +- theme/src/client/components/Archives.vue | 2 + theme/src/client/components/BlogExtract.vue | 8 +- theme/src/client/components/Flyout/index.vue | 60 +++-- theme/src/client/components/Friends.vue | 12 +- theme/src/client/components/FriendsItem.vue | 18 +- theme/src/client/components/Home.vue | 2 - .../client/components/Nav/NavBarHamburger.vue | 62 ++--- .../client/components/Nav/NavBarSearch.vue | 233 ------------------ theme/src/client/components/Nav/NavScreen.vue | 12 +- .../components/Nav/NavScreenMenuGroup.vue | 24 +- theme/src/client/components/Page.vue | 120 +++++---- theme/src/client/components/PageFooter.vue | 33 ++- theme/src/client/components/PostItem.vue | 130 +++++----- theme/src/client/components/PostList.vue | 27 +- theme/src/client/components/SidebarItem.vue | 30 +-- theme/src/client/components/Tags.vue | 6 +- theme/src/client/styles/content.scss | 47 ---- theme/src/client/styles/md-enhance.scss | 35 ++- theme/src/client/styles/normalize.scss | 26 +- theme/src/client/styles/search.scss | 231 +++++++++++++++++ 25 files changed, 583 insertions(+), 554 deletions(-) rename plugins/plugin-copy-code/src/client/styles/{button.scss => button.css} (100%) diff --git a/docs/.vuepress/theme.ts b/docs/.vuepress/theme.ts index 625a7243..4297e650 100644 --- a/docs/.vuepress/theme.ts +++ b/docs/.vuepress/theme.ts @@ -7,11 +7,13 @@ export const theme = themePlume({ hostname: 'https://pengzhanbo.cn', repo: 'https://github.com/pengzhanbo/vuepress-theme-plume', docsDir: 'docs', + avatar: { url: '/images/blogger.jpg', name: 'Plume Theme', description: 'The Theme for Vuepress 2.0', }, + social: [{ icon: 'github', link: 'https://github.com/pengzhanbo' }], footer: { copyright: 'Copyright © 2022-present pengzhanbo' }, @@ -26,10 +28,10 @@ export const theme = themePlume({ }, }, plugins: { - // docsearch: { - // apiKey: '111', - // appId: '111', - // indexName: '1234', - // } + docsearch: { + apiKey: '111', + appId: '111', + indexName: '1234', + }, }, }) diff --git a/eslint.config.js b/eslint.config.js index 29c01be0..f3e6261e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -11,4 +11,7 @@ export default config({ __VUE_OPTIONS_API__: 'readonly', __VUE_PROD_DEVTOOLS__: 'readonly', }, + rules: { + 'vue/no-v-text-v-html-on-component': 'off', + }, }) diff --git a/plugins/plugin-copy-code/src/client/clientConfig.ts b/plugins/plugin-copy-code/src/client/clientConfig.ts index 06ba938d..b0e3727a 100644 --- a/plugins/plugin-copy-code/src/client/clientConfig.ts +++ b/plugins/plugin-copy-code/src/client/clientConfig.ts @@ -1,7 +1,7 @@ import { defineClientConfig } from '@vuepress/client' import { setupCopyCode } from './setupCopyCode.js' -import './styles/button.scss' +import './styles/button.css' export default defineClientConfig({ setup() { diff --git a/plugins/plugin-copy-code/src/client/styles/button.scss b/plugins/plugin-copy-code/src/client/styles/button.css similarity index 100% rename from plugins/plugin-copy-code/src/client/styles/button.scss rename to plugins/plugin-copy-code/src/client/styles/button.css diff --git a/stylelint.config.js b/stylelint.config.js index ce1a5d7e..7f6cb898 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -5,7 +5,7 @@ export default stylelintConfig({ 'selector-pseudo-element-no-unknown': [true, { ignorePseudoElements: ['input-placeholder'], }], - 'no-descending-specificity': null, + // 'no-descending-specificity': null, 'custom-property-empty-line-before': null, 'property-no-vendor-prefix': null, 'selector-no-vendor-prefix': null, diff --git a/theme/src/client/components/Archives.vue b/theme/src/client/components/Archives.vue index 31bd7311..c9ad6caf 100644 --- a/theme/src/client/components/Archives.vue +++ b/theme/src/client/components/Archives.vue @@ -29,7 +29,9 @@ const { archives } = useArchives() diff --git a/theme/src/client/components/Friends.vue b/theme/src/client/components/Friends.vue index f3a25bb0..c607228f 100644 --- a/theme/src/client/components/Friends.vue +++ b/theme/src/client/components/Friends.vue @@ -22,11 +22,19 @@ const list = computed(() => matter.value.list || []) {{ matter.description }}

- +