Skip to content

Commit

Permalink
autofix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
walsh9 committed Oct 19, 2023
1 parent 13933e3 commit 38528c0
Show file tree
Hide file tree
Showing 136 changed files with 2,902 additions and 2,833 deletions.
34 changes: 17 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ workflows:
- build
- deploy:
name: Deploy (demo)
context: "AWS Deploy"
context: AWS Deploy
<<: *filter_demo
tag: demo
requires:
Expand All @@ -47,7 +47,7 @@ workflows:
- test_cypress
- deploy:
name: Deploy (prod)
context: "AWS Deploy"
context: AWS Deploy
env: prod
<<: *filter_prod
requires:
Expand All @@ -56,24 +56,24 @@ workflows:
- test_cypress
- cf-function-deploy:
name: Deploy CloudFront Functions (demo)
context: "AWS Deploy"
context: AWS Deploy
env: demo
<<: *filter_demo
requires:
- test
- test_nginx
- test_cypress
- "Deploy (demo)"
- Deploy (demo)
- cf-function-deploy:
name: Deploy CloudFront Functions (prod)
context: "AWS Deploy"
context: AWS Deploy
env: prod
<<: *filter_prod
requires:
- test
- test_nginx
- test_cypress
- "Deploy (prod)"
- Deploy (prod)

jobs:
# Note (allie): This is its own job because I don't
Expand Down Expand Up @@ -130,11 +130,11 @@ jobs:
parameters:
env:
type: enum
default: "demo"
enum: ["demo", "prod"]
default: demo
enum: [demo, prod]
tag:
type: string
default: ""
default: ''
steps:
- checkout
- run:
Expand All @@ -154,11 +154,11 @@ jobs:
parameters:
env:
type: enum
default: "demo"
enum: ["demo", "prod"]
default: demo
enum: [demo, prod]
tag:
type: string
default: ""
default: ''
steps:
- checkout
- setup_npmrc
Expand Down Expand Up @@ -196,8 +196,8 @@ jobs:
parameters:
env:
type: enum
default: "demo"
enum: ["demo", "prod"]
default: demo
enum: [demo, prod]
steps:
- checkout:
path: ~/project
Expand All @@ -207,7 +207,7 @@ jobs:
environment:
ENV: <<parameters.env>>
command: |
for x in *.js; do
for x in *.js; do
functionName=$(basename $x .js)
aws cloudfront describe-function --name $functionName-$ENV > /dev/null 2>&1
if [[ $? == 0 ]]; then
Expand All @@ -229,7 +229,7 @@ jobs:
environment:
ENV: <<parameters.env>>
command: |
for x in *.js; do
for x in *.js; do
functionName=$(basename $x .js)
etag=$(aws cloudfront describe-function --name $functionName-$ENV --query 'ETag' --output text)
aws cloudfront publish-function \
Expand All @@ -254,4 +254,4 @@ executors:
JOBS: 2

orbs:
aws-cli: circleci/[email protected]
aws-cli: circleci/[email protected]
16 changes: 8 additions & 8 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"semi": false,
"singleQuote": true,
"comma-dangle": false,
"parser": "vue",
"useTabs": false,
"tabWidth": 2,
"endOfLine": "lf"
}
"semi": false,
"singleQuote": true,
"comma-dangle": false,
"parser": "vue",
"useTabs": false,
"tabWidth": 2,
"endOfLine": "lf"
}
2 changes: 1 addition & 1 deletion .squash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ deployments:
run_options:
--env NUXT_HOST=$NUXT_HOST
--env NUXT_PORT=$NUXT_PORT
--env DOCKER_BUILDKIT=$DOCKER_BUILDKIT
--env DOCKER_BUILDKIT=$DOCKER_BUILDKIT
10 changes: 5 additions & 5 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
env: {
test: {
plugins: [
'@babel/plugin-transform-runtime'
]
}
}
'@babel/plugin-transform-runtime',
],
},
},
}
20 changes: 11 additions & 9 deletions components/ArticleDonationCTA.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<script setup>
import VFlexibleLink from '@nypublicradio/nypr-design-system-vue3/v2/src/components/VFlexibleLink.vue'
const config = useRuntimeConfig()
const props = defineProps({
title: {
type: String,
Expand All @@ -18,30 +16,34 @@ const props = defineProps({
},
})
const emit = defineEmits(['donate-click'])
const config = useRuntimeConfig()
const donateUrl = ref(
`${props.donateUrlBase || config.public.donateUrlBase}&utm_campaign=${
props.utmCampaign
}`
}`,
)
const getCurrentYear = () => new Date().getFullYear()
const emit = defineEmits(['donate-click'])
</script>

<template>
<div class="article-donation-CTA">
<div class="h6">{{ title }}</div>
<div class="h6">
{{ title }}
</div>
<p class="type-textlink2 no-underline">
Make your contribution now and help Gothamist thrive in
{{ getCurrentYear() }}.
<v-flexible-link
<VFlexibleLink
:to="donateUrl"
@click="emit('donate-click', donateUrl)"
class="author-name"
@click="emit('donate-click', donateUrl)"
>
Donate today
</v-flexible-link>
</VFlexibleLink>
</p>
</div>
</template>
Expand Down
12 changes: 6 additions & 6 deletions components/ArticleFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,33 @@ const onTagClick = (tag) => {
<div class="article-footer">
<!-- tags -->
<article-tags v-if="tags.length" :tags="tags" @tag-click="onTagClick" />
<!-- profile & comments-->
<hr class="black mb-4 md:mb-6" />
<!-- profile & comments -->
<hr class="black mb-4 md:mb-6">
<div class="grid gutter-x-30">
<div class="profile-col">
<author-profile
v-for="profile in profileData"
:key="profile.id"
:profileData="profile"
:profile-data="profile"
:sponsored="isSponsored"
class="mb-4 md:mb-6"
/>
<div class="block mx-auto block lg:hidden mb-6" style="width: 300px">
<HtlAd
layout="rectangle"
slot="htlad-gothamist_interior_rectangle_article_bio"
layout="rectangle"
fineprint="Gothamist is funded by sponsors and member donations"
/>
</div>
<div v-if="!isDisableComments" id="comments" class="mb-4 md:mb-6">
<hr class="black mb-4 md:mb-6" />
<hr class="black mb-4 md:mb-6">
<comments-section :article="props.article" />
</div>
</div>
<div class="col-fixed mx-auto hidden lg:block">
<HtlAd
layout="rectangle"
slot="htlad-gothamist_interior_rectangle_article_bio"
layout="rectangle"
fineprint="Gothamist is funded by sponsors and member donations"
/>
</div>
Expand Down
22 changes: 12 additions & 10 deletions components/ArticlePageHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import VFlexibleLink from '@nypublicradio/nypr-design-system-vue3/v2/src/components/VFlexibleLink.vue'
import VShareTools from '@nypublicradio/nypr-design-system-vue3/v2/src/components/VShareTools.vue'
import VShareToolsItem from '@nypublicradio/nypr-design-system-vue3/v2/src/components/VShareToolsItem.vue'
const { $analytics } = useNuxtApp()
const props = defineProps({
title: {
Expand Down Expand Up @@ -30,6 +29,9 @@ const props = defineProps({
default: '',
},
})
const { $analytics } = useNuxtApp()
const sidebarIsOpen = useSidebarIsOpen()
const sidebarOpenedFrom = useSidebarOpenedFrom()
const strapline = useStrapline()
Expand All @@ -47,17 +49,17 @@ const openSidebar = (e) => {
class="article-page-header-contents content py-0 my-3 flex align-items-center justify-content-between"
>
<div class="article-page-header-left">
<v-flexible-link to="/" raw>
<VFlexibleLink to="/" raw>
<LogoGothamist class="article-page-header-logo" />
</v-flexible-link>
</VFlexibleLink>
<div class="article-page-header-tagline hidden" v-html="strapline" />
</div>
<div class="article-page-header-center hidden h6 md:block px-4">
{{ title }}
</div>
<div class="article-page-header-right flex justify-content-end">
<v-share-tools class="hidden lg:flex mx-3">
<v-share-tools-item
<VShareTools class="hidden lg:flex mx-3">
<VShareToolsItem
action="share"
service="facebook"
:url="shareUrl"
Expand All @@ -75,7 +77,7 @@ const openSidebar = (e) => {
"
/>

<v-share-tools-item
<VShareToolsItem
action="share"
service="twitter"
:url="shareUrl"
Expand All @@ -93,7 +95,7 @@ const openSidebar = (e) => {
})
"
/>
<v-share-tools-item
<VShareToolsItem
action="share"
service="reddit"
:url="shareUrl"
Expand All @@ -111,11 +113,11 @@ const openSidebar = (e) => {
})
"
/>
<v-share-tools-item
<VShareToolsItem
action="share"
service="email"
:url="shareUrl"
:share-parameters="{ body: shareTitle + ' - %URL%' }"
:share-parameters="{ body: `${shareTitle} - %URL%` }"
:utm-parameters="{
medium: 'social',
source: 'email',
Expand All @@ -129,7 +131,7 @@ const openSidebar = (e) => {
})
"
/>
</v-share-tools>
</VShareTools>
<a
class="article-page-header-donate-button mod-button p-component p-button p-button-rounded mr-2"
:href="`${donateUrlBase}&utm_campaign=${utmCampaign}`"
Expand Down
24 changes: 12 additions & 12 deletions components/ArticleRecirculation.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { useUpdateCommentCounts } from '~~/composables/comments';
import { ArticlePage } from '~~/composables/types/Page';
import { onMounted, ref } from 'vue'
import { useUpdateCommentCounts } from '~~/composables/comments'
import type { ArticlePage } from '~~/composables/types/Page'
const props = withDefaults(defineProps<{
// the article to filter out from the results if it exists
Expand All @@ -12,15 +12,15 @@ const props = withDefaults(defineProps<{
}>(), {
article: null,
slug: 'news',
trackingComponentLocation: "Recirculation Module",
nativoId: ""
trackingComponentLocation: 'Recirculation Module',
nativoId: '',
})
const trackingComponent = "Recirculation Module"
const trackingComponent = 'Recirculation Module'
const routeSectionSlug = ref(props.slug)
const { title: sectionTitle, id: sectionId } = await findPage(
routeSectionSlug.value as string
routeSectionSlug.value as string,
).then(({ data }) => normalizeFindPageResponse(data))
const articles = await findArticlePages({
Expand All @@ -31,7 +31,7 @@ const articles = await findArticlePages({
// remove the current article from the list of articles
const articlesFiltered = articles.filter(
(article) => article.id !== props.article?.id
article => article.id !== props.article?.id,
)
onMounted(async () => {
Expand All @@ -42,9 +42,9 @@ onMounted(async () => {
<template>
<LeftFeature
class="recirculation"
:collection="{data: articlesFiltered}"
trackingComponent="Recirculation Module"
trackingComponentLocation="Recirculation Module"
:nativoId="nativoId"
:collection="{ data: articlesFiltered }"
tracking-component="Recirculation Module"
tracking-component-location="Recirculation Module"
:nativo-id="nativoId"
/>
</template>
Loading

0 comments on commit 38528c0

Please sign in to comment.