style: fix linting issues met Prettier

This commit is contained in:
Lint Action 2025-04-18 23:36:22 +00:00
parent af8c783a26
commit 5168ceaee0
56 changed files with 680 additions and 741 deletions

View file

@ -1,11 +1,14 @@
export const multipleChoiceQuestionAdapter: GiftAdapter = {
questionType: "MC",
installListener(questionElement: Element, answerUpdateCallback: (newAnswer: string | number | object) => void): void {
questionElement.querySelectorAll('input[type=radio]').forEach(element => {
installListener(
questionElement: Element,
answerUpdateCallback: (newAnswer: string | number | object) => void,
): void {
questionElement.querySelectorAll("input[type=radio]").forEach((element) => {
const input = element as HTMLInputElement;
input.addEventListener('change', () => {
input.addEventListener("change", () => {
answerUpdateCallback(parseInt(input.value));
});
// Optional: initialize value if already selected
@ -16,9 +19,9 @@ export const multipleChoiceQuestionAdapter: GiftAdapter = {
},
setAnswer(questionElement: Element, answer: string | number | object): void {
questionElement.querySelectorAll('input[type=radio]').forEach(element => {
questionElement.querySelectorAll("input[type=radio]").forEach((element) => {
const input = element as HTMLInputElement;
input.checked = String(answer) === String(input.value);
});
}
}
},
};