Skip to content

Commit

Permalink
fix: lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuagraber committed Jan 28, 2025
1 parent 2e466b1 commit 5f9ccbb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
18 changes: 11 additions & 7 deletions src/components/Footer/PdapFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
rel="noreferrer"
class="text-neutral-50 dark:text-neutral-950"
>
<FontAwesomeIcon v-if="link.icon" :icon="iconMap.get(link.icon)!" class="text-brand-wine-100 dark:text-brand-wine-800"/>
<FontAwesomeIcon
v-if="link.icon"
:icon="iconMap.get(link.icon)!"
class="text-brand-wine-100 dark:text-brand-wine-800"
/>
{{ link.text }}
</a>
<router-link
Expand All @@ -28,8 +32,11 @@
{{ link.text }}
</router-link>
</li>
</ul><!-- COPYRIGHT AND TRANSPARENCY -->
<div class="flex gap-4 justify-between text-lg lg:justify-start lg:items-center lg:ml-auto">
</ul>
<!-- COPYRIGHT AND TRANSPARENCY -->
<div
class="flex gap-4 justify-between text-lg lg:justify-start lg:items-center lg:ml-auto"
>
<p class="lg:max-w-[325px] lg:text-right xl:max-w-[375px]">
© {{ new Date().getFullYear() }} Police Data Accessibility Project is a
non-profit. EIN: 85-4207132.
Expand All @@ -53,10 +60,7 @@

<script setup lang="ts">
import { inject } from 'vue';
import {
PdapFooterSocialLinks,
FooterIconName,
} from './types';
import { PdapFooterSocialLinks, FooterIconName } from './types';
import { FOOTER_LINK_ICONS } from './constants';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import {
Expand Down
6 changes: 4 additions & 2 deletions src/components/Footer/footer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ describe('Link behavior', () => {

test('Internal links should not open in new tab', () => {
const wrapper = mount(PdapFooter, base);
const internalLinks = wrapper.findAll('a:not([href^="http"]):not([href^="mailto"])');
const internalLinks = wrapper.findAll(
'a:not([href^="http"]):not([href^="mailto"])'
);

internalLinks.forEach((link) => {
expect(link.attributes('target')).toBeFalsy();
expect(link.attributes('rel')).toBeFalsy();
});
});
});
});
13 changes: 6 additions & 7 deletions src/components/Header/PdapHeader.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<header ref="el" class="pdap-header">
<a v-if="!navLogoLinkIsPath" :href="logoAnchorPath" class="logo"
>
<a v-if="!navLogoLinkIsPath" :href="logoAnchorPath" class="logo">
<FontAwesomeIcon :icon="faArrowsToCircle" />
&nbsp;Police Data Access Point</a>
<router-link v-else :to="logoAnchorPath" class="logo"
>
&nbsp;Police Data Access Point</a
>
<router-link v-else :to="logoAnchorPath" class="logo">
<FontAwesomeIcon :icon="faArrowsToCircle" />
&nbsp;Police Data Access Point</router-link>
&nbsp;Police Data Access Point</router-link
>
<PdapNav />
</header>
</template>
Expand Down Expand Up @@ -77,5 +77,4 @@ export default {
@apply lg:text-lg;
@apply xs:max-w-none;
}
</style>

0 comments on commit 5f9ccbb

Please # to comment.