Skip to content

Commit

Permalink
vue/component-name-in-template-casing が script setup に対応した
Browse files Browse the repository at this point in the history
  • Loading branch information
kkeisuke committed Sep 8, 2022
1 parent d9f76a0 commit 1b660de
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Expand Up @@ -10,7 +10,7 @@
"@typescript-eslint/ban-types": "error",
"vue/no-side-effects-in-computed-properties": "error",
"vue/html-self-closing": ["error", { "html": { "void": "always" } }],
"vue/component-name-in-template-casing": ["error", "kebab-case"], // script setup では動かない? https://github.com/vuejs/eslint-plugin-vue/issues/1629
"vue/component-name-in-template-casing": ["error", "kebab-case"],
"vue/no-duplicate-attr-inheritance": "error",
"vue/no-template-target-blank": "error",
// "vue/no-unused-properties": "error", // defineProps で意図ぜず error になる
Expand Down
6 changes: 3 additions & 3 deletions components/common/Links.vue
Expand Up @@ -5,13 +5,13 @@ import SvgIcon from '@/components/common/SvgIcon.vue'
<template>
<aside class="flex items-center gap-2">
<a href="https://kkeisuke.com" target="_blank" rel="noopener noreferrer" aria-label="home">
<SvgIcon icon="home" class="w-6 h-6" />
<svg-icon icon="home" class="w-6 h-6" />
</a>
<a href="https://github.com/kkeisuke" target="_blank" rel="noopener noreferrer" aria-label="github">
<SvgIcon icon="github" class="w-6 h-6" />
<svg-icon icon="github" class="w-6 h-6" />
</a>
<a href="https://twitter.com/kkeisuke" target="_blank" rel="noopener noreferrer" aria-label="twitter">
<SvgIcon icon="twitter" class="w-6 h-6" />
<svg-icon icon="twitter" class="w-6 h-6" />
</a>
</aside>
</template>
4 changes: 2 additions & 2 deletions pages/404.vue
Expand Up @@ -8,10 +8,10 @@ const { title } = useRuntimeConfig().public

<template>
<main>
<ArticleBlogTitle :title="title" class="mb-10" />
<article-blog-title :title="title" class="mb-10" />
<!-- path が無いと、generate 時に取得できない -->
<ContentDoc path="/404" class="nuxt-content" tag="section" />
<Links class="pt-4" />
<links class="pt-4" />
</main>
</template>

Expand Down
6 changes: 3 additions & 3 deletions pages/articles/[...slug].vue
Expand Up @@ -26,17 +26,17 @@ article.value && useHead({

<template>
<main>
<ArticleBlogTitle :title="title" class="mb-10" />
<article-blog-title :title="title" class="mb-10" />
<article>
<template v-if="article">
<ArticleHeader :title="article.title" :date="article.date" class="mb-10" />
<article-header :title="article.title" :date="article.date" class="mb-10" />
<ContentRenderer :value="article" class="nuxt-content" />
</template>
<template v-else>
<ContentDoc path="/404" class="nuxt-content" tag="section" />
</template>
</article>
<Links class="pt-4" />
<links class="pt-4" />
</main>
</template>

Expand Down
6 changes: 3 additions & 3 deletions pages/index.vue
Expand Up @@ -16,9 +16,9 @@ useHead({

<template>
<main>
<BlogTitle :title="title" class="mb-4" />
<Links />
<ArticleList v-for="article in articles" :key="article._path" :article="article" class="mt-8" />
<blog-title :title="title" class="mb-4" />
<links />
<article-list v-for="article in articles" :key="article._path" :article="article" class="mt-8" />
<aside class="pt-24">
<p>2019年以前は <a href="https://kkeisuke.hatenablog.com/archive" target="_blank" rel="noopener noreferrer">はてなブログ</a> へ</p>
</aside>
Expand Down

0 comments on commit 1b660de

Please sign in to comment.