🚨 Fixed linter warnings

This commit is contained in:
Mawoka
2022-06-20 21:54:15 +02:00
parent c1c2405067
commit 4d8caa6dc7
10 changed files with 3 additions and 38 deletions
+1 -23
View File
@@ -1,37 +1,20 @@
<script lang="ts">
import { getLocalization } from '$lib/i18n';
import { mint } from '$lib/hashcash';
import { dataSchema } from '$lib/yupSchemas';
import type { EditorData, Question, Answer } from './quiz_types';
import type { EditorData, Question } from './quiz_types';
import Sidebar from '$lib/editor/sidebar.svelte';
import SettingsCard from '$lib/editor/settings-card.svelte';
import QuizCard from '$lib/editor/card.svelte';
import Spinner from './Spinner.svelte';
import { onMount } from 'svelte';
const { t } = getLocalization();
let schemaInvalid = false;
let yupErrorMessage = '';
export let data: EditorData;
export let submit_button_text = 'Create';
export let quiz_id: string | null;
let selected_question = -1;
let imgur_links_valid = false;
const empty_question: Question = {
question: '',
time: '20',
image: '',
answers: [
{
right: false,
answer: ''
}
]
};
const validateInput = async (data: EditorData) => {
try {
await dataSchema.validate(data, { abortEarly: false });
@@ -61,11 +44,6 @@
};
$: imgur_links_valid = checkIfAllQuestionImagesComplyWithRegex(data.questions);
const empty_answer: Answer = {
right: false,
answer: ''
};
let edit_id;
let confirm_to_leave = true;
let pow_data;