Skip to content

Commit

Permalink
fix: ESLint と Prettier の競合を解消した (Prettier に寄せた)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pugma committed Oct 23, 2024
1 parent bd4dcd2 commit 9080c22
Show file tree
Hide file tree
Showing 29 changed files with 168 additions and 35 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"vueIndentScriptAndStyle": false,
"endOfLine": "auto"
"endOfLine": "auto",
"singleAttributePerLine": true
}
20 changes: 18 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const vueLint = {
files: ['*.vue', '**/*.vue'],
languageOptions: {
parserOptions: {
parser: "@typescript-eslint/parser"
parser: '@typescript-eslint/parser'
}
},
rules: {
Expand All @@ -30,7 +30,23 @@ const vueLint = {
}
],

'vue/custom-event-name-casing': ['error', 'camelCase']
'vue/custom-event-name-casing': ['error', 'camelCase'],

'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always'
},
svg: 'always',
math: 'always'
}
],

'vue/singleline-html-element-content-newline': ['off'],
'vue/html-indent': ['off']
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import PageFooter from '/@/components/Layout/PageFooter.vue'

<template>
<page-header />
<router-view v-slot="{ Component }" :class="$style.main">
<router-view
v-slot="{ Component }"
:class="$style.main"
>
<template v-if="Component">
<suspense>
<template #default>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Contest/ContestTeamListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ defineProps<{
}"
>
<span :class="$style.name">{{ contestTeam.name }}</span>
<span v-if="contestTeam.result" :class="$style.result">
<span
v-if="contestTeam.result"
:class="$style.result"
>
({{ contestTeam.result }})
</span>
</router-link>
Expand Down
6 changes: 5 additions & 1 deletion src/components/ContestTeam/MemberListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ defineProps<{
:class="$style.link"
:to="{ name: 'User', params: { userId: member.name } }"
>
<user-icon :class="$style.icon" :user-name="member.name" :size="32" />
<user-icon
:class="$style.icon"
:user-name="member.name"
:size="32"
/>
<p :class="$style.name">
{{ member.name }}
</p>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Event/HostnameListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ defineProps<{
:class="$style.link"
:to="{ name: 'User', params: { userId: hostname.name } }"
>
<user-icon :class="$style.icon" :user-name="hostname.name" :size="128" />
<user-icon
:class="$style.icon"
:user-name="hostname.name"
:size="128"
/>
<div :class="$style.desc">
<div :class="$style.name">
{{ hostname.name }}
Expand Down
6 changes: 5 additions & 1 deletion src/components/Events/EventList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ defineProps<Props>()

<template>
<section :class="$style.container">
<event-list-item v-for="event in events" :key="event.id" :event="event" />
<event-list-item
v-for="event in events"
:key="event.id"
:event="event"
/>
</section>
</template>

Expand Down
6 changes: 5 additions & 1 deletion src/components/Group/AdminList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ defineProps<Props>()
<section :class="$style.section">
<section-title>リーダー</section-title>
<ul :class="$style.container">
<admin-list-item v-for="admin in admins" :key="admin.id" :admin="admin" />
<admin-list-item
v-for="admin in admins"
:key="admin.id"
:admin="admin"
/>
</ul>
</section>
</template>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Group/AdminListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ defineProps<{
:class="$style.link"
:to="{ name: 'User', params: { userId: admin.name } }"
>
<user-icon :class="$style.icon" :user-name="admin.name" :size="32" />
<user-icon
:class="$style.icon"
:user-name="admin.name"
:size="32"
/>
<span :class="$style.name">{{ admin.name }}</span>
</router-link>
</li>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Group/MemberListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ defineProps<{
:class="$style.link"
:to="{ name: 'User', params: { userId: member.name } }"
>
<user-icon :class="$style.icon" :user-name="member.name" :size="32" />
<user-icon
:class="$style.icon"
:user-name="member.name"
:size="32"
/>
<p :class="$style.name">
{{ member.name }}
</p>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Groups/GroupList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ defineProps<Props>()

<template>
<ul :class="$style.container">
<group-list-item v-for="group in groups" :key="group.id" :group="group" />
<group-list-item
v-for="group in groups"
:key="group.id"
:group="group"
/>
</ul>
</template>

Expand Down
10 changes: 8 additions & 2 deletions src/components/Index/TopSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ defineProps<{
</div>
<div :class="$style.contentContainer">
<slot />
<div v-if="moreLink !== undefined" :class="$style.moreLinkContainer">
<router-link :to="moreLink" :class="$style.moreLink">
<div
v-if="moreLink !== undefined"
:class="$style.moreLinkContainer"
>
<router-link
:to="moreLink"
:class="$style.moreLink"
>
もっと見る
</router-link>
</div>
Expand Down
11 changes: 9 additions & 2 deletions src/components/Layout/BreadCrumbTrail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ defineProps<{

<template>
<nav :class="$style.container">
<template v-for="(path, index) in paths" :key="path">
<template
v-for="(path, index) in paths"
:key="path"
>
<a-icon
v-if="index !== 0"
:class="$style.icon"
Expand All @@ -27,7 +30,11 @@ defineProps<{
>
{{ path.name }}
</router-link>
<span v-else :class="$style.currentPath">{{ path.name }}</span>
<span
v-else
:class="$style.currentPath"
>{{ path.name }}
</span>
</template>
</nav>
</template>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Layout/PageContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ defineProps<{

<template>
<main :class="$style.container">
<bread-crumb-trail v-if="paths !== undefined" :paths="paths" />
<bread-crumb-trail
v-if="paths !== undefined"
:paths="paths"
/>
<slot />
</main>
</template>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Layout/PageFooter.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<template>
<footer :class="$style.container">
<div :class="$style.copy">
<img src="/@/assets/traP_logo_full_white.svg" :class="$style.logo" />
<img
src="/@/assets/traP_logo_full_white.svg"
:class="$style.logo"
/>
<div :class="$style.copyright">© 2015- traP</div>
</div>
</footer>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Project/MemberListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ defineProps<{
:class="$style.link"
:to="{ name: 'User', params: { userId: member.name } }"
>
<user-icon :class="$style.icon" :user-name="member.name" :size="32" />
<user-icon
:class="$style.icon"
:user-name="member.name"
:size="32"
/>
<span :class="$style.name">{{ member.name }}</span>
<span :class="$style.duration">
{{ getGroupOrProjectDuration(member.duration) }}
Expand Down
6 changes: 5 additions & 1 deletion src/components/Search/UserListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ defineProps<{
:class="$style.link"
:to="{ name: 'User', params: { userId: member.name } }"
>
<user-icon :class="$style.icon" :user-name="member.name" :size="32" />
<user-icon
:class="$style.icon"
:user-name="member.name"
:size="32"
/>
<p :class="$style.name">
{{ member.name }}
</p>
Expand Down
7 changes: 6 additions & 1 deletion src/components/UI/AIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ withDefaults(defineProps<Props>(), {
</script>

<template>
<Icon :icon="name" :class="$style.icon" :width="size" :height="size" />
<Icon
:icon="name"
:class="$style.icon"
:width="size"
:height="size"
/>
</template>

<style lang="scss" module>
Expand Down
11 changes: 9 additions & 2 deletions src/components/UI/ExternalLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ import AIcon from './AIcon.vue'
</script>

<template>
<a :class="$style.container" target="_blank" rel="noreferrer noopener">
<a-icon name="mdi:open-in-new" :class="$style.icon" />
<a
:class="$style.container"
target="_blank"
rel="noreferrer noopener"
>
<a-icon
name="mdi:open-in-new"
:class="$style.icon"
/>
<slot />
</a>
</template>
Expand Down
6 changes: 5 additions & 1 deletion src/components/UI/SearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ const iconSize = computed(() => {

<template>
<div :class="[$style.inputWrapper, size === 'large' ? $style.large : '']">
<a-icon name="mdi:magnify" :size="iconSize" :class="$style.icon" />
<a-icon
name="mdi:magnify"
:size="iconSize"
:class="$style.icon"
/>
<input
v-model="input"
type="search"
Expand Down
6 changes: 5 additions & 1 deletion src/components/User/AccountList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ const props = defineProps<{
target="_blank"
rel="noreferrer noopener"
>
<img src="/@/assets/traP_logo_icon.svg" width="24" height="24" />
<img
src="/@/assets/traP_logo_icon.svg"
width="24"
height="24"
/>
</a>
</li>
<account-list-item
Expand Down
6 changes: 5 additions & 1 deletion src/components/User/AccountListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ const service = computed<Service | undefined>(() =>
width="24"
height="24"
/>
<a-icon v-else :name="service.icon ?? ''" :size="24" />
<a-icon
v-else
:name="service.icon ?? ''"
:size="24"
/>
</a>
</li>
</template>
Expand Down
11 changes: 9 additions & 2 deletions src/components/User/ContestsContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ defineProps<Props>()
<template>
<section :class="$style.section">
<h2 :class="$style.title">実績</h2>
<ul v-if="contests.length > 0" :class="$style.contests">
<li v-for="contest in contests" :key="contest.id" :class="$style.contest">
<ul
v-if="contests.length > 0"
:class="$style.contests"
>
<li
v-for="contest in contests"
:key="contest.id"
:class="$style.contest"
>
<router-link
:to="{ name: 'Contest', params: { contestId: contest.id } }"
:class="$style.link"
Expand Down
5 changes: 4 additions & 1 deletion src/components/User/EventsContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ defineProps<Props>()
<template>
<div>
<div :class="$style.title">イベント一覧</div>
<p v-for="event in events" :key="event.id">
<p
v-for="event in events"
:key="event.id"
>
{{ event.name }}
</p>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/components/User/ProjectsContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ defineProps<Props>()
<template>
<section :class="$style.section">
<h2 :class="$style.title">参加プロジェクト</h2>
<project-list v-if="projects.length > 0" :projects="projects" />
<project-list
v-if="projects.length > 0"
:projects="projects"
/>
<p v-else>これまでに参加したプロジェクトはありません</p>
</section>
</template>
Expand Down
6 changes: 5 additions & 1 deletion src/components/User/UserDetailContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ defineProps<{

<template>
<div :class="$style.container">
<user-icon :class="$style.icon" :user-name="userDetail.name" :size="64" />
<user-icon
:class="$style.icon"
:user-name="userDetail.name"
:size="64"
/>
<div :class="$style.rightContainer">
<div :class="$style.nameContainer">
<div :class="$style.name">
Expand Down
5 changes: 4 additions & 1 deletion src/pages/GroupPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ onMounted(() => {
<div :class="$style.container">
<div :class="$style.titleContainer">
<page-title>{{ groupDetail.name }}</page-title>
<external-link :href="groupDetail.link" :class="$style.link">
<external-link
:href="groupDetail.link"
:class="$style.link"
>
紹介ページ
</external-link>
</div>
Expand Down
Loading

0 comments on commit 9080c22

Please sign in to comment.