diff --git a/client/.eslintrc.js b/client/.eslintrc.js index b9dd09d7..251f3e6d 100644 --- a/client/.eslintrc.js +++ b/client/.eslintrc.js @@ -95,6 +95,13 @@ module.exports = { }, ], 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], }, }; diff --git a/client/src/directives/click-outside.ts b/client/src/directives/click-outside.ts index b796fd7a..6f6eb45b 100644 --- a/client/src/directives/click-outside.ts +++ b/client/src/directives/click-outside.ts @@ -1,5 +1,5 @@ // taken from https://stackoverflow.com/questions/36170425/detect-click-outside-element -import { DirectiveBinding, VNode } from 'vue'; +import { DirectiveBinding } from 'vue'; declare global { interface HTMLElement { diff --git a/client/src/helpers/matomo-client.ts b/client/src/helpers/matomo-client.ts index 3e25f7f6..20abbfa2 100644 --- a/client/src/helpers/matomo-client.ts +++ b/client/src/helpers/matomo-client.ts @@ -1,4 +1,3 @@ -import log from 'loglevel'; import { CHAPTER_DESCRIPTION_TYPE, CHAPTER_TITLE_TYPE, diff --git a/client/src/helpers/survey-solutions.ts b/client/src/helpers/survey-solutions.ts index c0fdf185..bf917ad5 100644 --- a/client/src/helpers/survey-solutions.ts +++ b/client/src/helpers/survey-solutions.ts @@ -19,9 +19,7 @@ const extractAnswerFromQuestion = (previous: any[], question: Question) => { const type = question.getType(); if (type === 'matrix' || type === 'matrixdropdown') { const correctAnswer = question.correctAnswer; - const { rows, columns } = question; - const col1 = columns[0]; - const col2 = columns[1]; + const { rows } = question; answer = rows.map(({ text, value }: RowKey) => { const labelWitoutPunctuation = /[,.!?]/.test(text.slice(-1)) ? text.slice(0, -1) : text; // the last character might be a period, comma, question or exclamation mark. If not, we just return the key as-is diff --git a/client/src/mixins/me.ts b/client/src/mixins/me.ts index fda00d09..3b1e093c 100644 --- a/client/src/mixins/me.ts +++ b/client/src/mixins/me.ts @@ -1,7 +1,7 @@ import ME_QUERY from '@/graphql/gql/queries/meQuery.gql'; import { computed } from 'vue'; import { useQuery } from '@vue/apollo-composable'; -import { matomoTrackPageView, matomoTrackUser } from '@/helpers/matomo-client'; +import { matomoTrackUser } from '@/helpers/matomo-client'; export interface Me { selectedClass: { diff --git a/client/src/setup/setupApp.ts b/client/src/setup/setupApp.ts index 352f7b73..2f7f2ed0 100644 --- a/client/src/setup/setupApp.ts +++ b/client/src/setup/setupApp.ts @@ -1,4 +1,4 @@ -import { createApp, h, provide } from 'vue'; +import { createApp } from 'vue'; import App from '@/App.vue'; import apolloClients from './apollo';