Fix some linting issues

This commit is contained in:
Ramon Wenger 2024-02-01 17:06:11 +01:00
parent 837fcc81be
commit ef3d8ac2e7
6 changed files with 12 additions and 8 deletions

View File

@ -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: '^_',
},
],
},
};

View File

@ -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 {

View File

@ -1,4 +1,3 @@
import log from 'loglevel';
import {
CHAPTER_DESCRIPTION_TYPE,
CHAPTER_TITLE_TYPE,

View File

@ -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

View File

@ -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: {

View File

@ -1,4 +1,4 @@
import { createApp, h, provide } from 'vue';
import { createApp } from 'vue';
import App from '@/App.vue';
import apolloClients from './apollo';