Skip to content

Commit e9285d1

Browse files
Sebastian Fellner 💯Sebastian Fellner 💯
authored andcommitted
chore: establish deterministic frontend checks
1 parent 57dbc94 commit e9285d1

16 files changed

Lines changed: 112 additions & 18818 deletions

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ static/sw.js
33
.direnv
44
.idea
55
.nuxt
6+
coverage
7+
dist
68
node_modules

.eslintrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
env:
22
browser: true
33
node: true
4+
root: true
45
extends:
56
- "eslint:recommended"
67
# - "@nuxtjs/eslint-config-typescript"

.github/workflows/deployment-dev.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
deploy-firebase-dev:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
- uses: pnpm/action-setup@v4
17+
- uses: actions/setup-node@v4
1718
with:
1819
node-version: 16
19-
- uses: pnpm/action-setup@v2
20-
with:
21-
version: 8
22-
- run: pnpm install && pnpm ci-dev-build
20+
cache: pnpm
21+
- run: pnpm install --frozen-lockfile
22+
- run: pnpm ci-dev-build
2323
env:
2424
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
25-
- uses: actions/setup-node@v3
25+
- uses: actions/setup-node@v4
2626
with:
2727
node-version: 20
2828
- uses: FirebaseExtended/action-hosting-deploy@v0

.github/workflows/deployment-live.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout 🛎️
13-
uses: actions/checkout@v2.3.1
14-
- uses: actions/setup-node@v3
13+
uses: actions/checkout@v4
14+
- uses: pnpm/action-setup@v4
15+
- uses: actions/setup-node@v4
1516
with:
1617
node-version: 16
17-
- uses: pnpm/action-setup@v2
18-
with:
19-
version: 8
18+
cache: pnpm
2019
- name: Install and Build 🔧
2120
run: |
22-
pnpm install
23-
pnpm nuxt generate
21+
pnpm install --frozen-lockfile
22+
pnpm generate
2423
env:
2524
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
2625
- name: Deploy 🚀
27-
uses: JamesIves/github-pages-deploy-action@4.0.0
26+
uses: JamesIves/github-pages-deploy-action@v4
2827
with:
2928
branch: gh-pages # The branch the action should deploy to.
3029
folder: dist # The folder the action should deploy.

.github/workflows/deployment-pr.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
deploy-firebase-pr:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
- uses: pnpm/action-setup@v4
17+
- uses: actions/setup-node@v4
1718
with:
1819
node-version: 16
19-
- uses: pnpm/action-setup@v2
20-
with:
21-
version: 8
22-
- run: pnpm install && pnpm ci-dev-build
20+
cache: pnpm
21+
- run: pnpm install --frozen-lockfile
22+
- run: pnpm ci-dev-build
2323
env:
2424
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
25-
- uses: actions/setup-node@v3
25+
- uses: actions/setup-node@v4
2626
with:
2727
node-version: 20
2828
- uses: FirebaseExtended/action-hosting-deploy@v0

.github/workflows/husky.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,23 @@ on:
1111

1212
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1313
jobs:
14-
# This workflow contains a single job called "build"
15-
lint-and-prettify:
14+
checks:
1615
# The type of runner that the job will run on
1716
runs-on: ubuntu-latest
1817

1918
# Steps represent a sequence of tasks that will be executed as part of the job
2019
steps:
2120
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22-
- uses: actions/checkout@v2
23-
- uses: pnpm/action-setup@v2
24-
with:
25-
version: 8
26-
- uses: actions/setup-node@v3
21+
- uses: actions/checkout@v4
22+
- uses: pnpm/action-setup@v4
23+
- uses: actions/setup-node@v4
2724
with:
2825
node-version: 16
26+
cache: pnpm
2927
- name: install dependencies
30-
run: pnpm install
31-
- run: pnpm exec prettier --write .
32-
- run: pnpm exec eslint .
28+
run: pnpm install --frozen-lockfile
29+
- run: pnpm format:check
30+
- run: pnpm lint
31+
- run: pnpm test
32+
- run: pnpm ci-dev-build
33+
- run: pnpm test:generated

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.nuxt
2+
dist
23
*.md
34
node_modules
45
coverage

components/ChatVisualization/ChatVisualization.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ export default {
3131
// its possible that the first person did not write any message at all
3232
ego: this.chat.messagesPerPerson[0]?.name,
3333
price: 7.99,
34-
currency: "EUR"
34+
currency: "EUR",
3535
};
3636
},
3737
methods: {
3838
setEgo(ego) {
3939
this.ego = ego;
40-
}
41-
}
40+
},
41+
},
4242
};
4343
</script>

components/ChatVisualization/PdfDownloadPopup.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ export default {
264264
downloadSample() {
265265
gtagEvent("sample_download", GTAG_PDF, 2);
266266
const query = (this.$route && this.$route.query) || {};
267-
this.download(!('free' in query));
267+
this.download(!("free" in query));
268268
},
269269
workerResponseHandler: function (event) {
270270
const data = event.data;

components/DownloadPopup.vue

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@
7979
<div v-if="!isSimple" class="text-text-h3 my-4">
8080
<v-col>
8181
<div v-if="!isSimple" class="text-body-1 pb-2">
82-
{{ $t("lookingFor") }} <b>{{ $t("pdfDownload") }}
83-
</b>?
82+
{{ $t("lookingFor") }} <b>{{ $t("pdfDownload") }} </b>?
8483
</div>
8584

8685
<v-btn
@@ -105,24 +104,29 @@
105104
<script>
106105
import html2canvas from "html2canvas";
107106
import { downloadBase64File } from "~/utils/utils";
108-
import { GTAG_INTERACTION, GTAG_PAYMENT, GTAG_RESULTS, gtagEvent } from "~/utils/gtagValues";
107+
import {
108+
GTAG_INTERACTION,
109+
GTAG_PAYMENT,
110+
GTAG_RESULTS,
111+
gtagEvent,
112+
} from "~/utils/gtagValues";
109113
110114
export default {
111115
name: "DownloadPopup",
112116
props: {
113117
chat: { type: Object },
114-
isSimple: { default: false, type: Boolean }
118+
isSimple: { default: false, type: Boolean },
115119
},
116120
data() {
117121
return {
118122
dialog: false,
119123
loading: false,
120124
suffix: this.isSimple ? "-top" : "",
121-
GTAG_INTERACTION
125+
GTAG_INTERACTION,
122126
};
123127
},
124128
methods: {
125-
download: function() {
129+
download: function () {
126130
this.loading = true;
127131
gtagEvent("download_image", GTAG_RESULTS);
128132
@@ -145,13 +149,13 @@ export default {
145149
scrollX: 0,
146150
scrollY: -window.scrollY,
147151
height: normalHeight + additionalHeight + negativeHeight,
148-
onclone: function(clonedDoc) {
152+
onclone: function (clonedDoc) {
149153
let nonVisibleStuff = clonedDoc.querySelectorAll(
150154
".only-visible-to-html2canvas"
151155
);
152156
nonVisibleStuff.forEach((y) => (y.style.display = "block"));
153157
return clonedDoc;
154-
}
158+
},
155159
});
156160
157161
let names = this.chat.messagesPerPerson
@@ -170,7 +174,7 @@ export default {
170174
paypalButtonPressed() {
171175
gtagEvent("donation_download_results", GTAG_PAYMENT, 5);
172176
},
173-
gtagEvent
174-
}
177+
gtagEvent,
178+
},
175179
};
176180
</script>

0 commit comments

Comments
 (0)