Skip to content

Commit

Permalink
Fix all unused properties linting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Dec 12, 2024
1 parent c79b135 commit 79ab96a
Show file tree
Hide file tree
Showing 54 changed files with 63 additions and 364 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,13 @@
}
return {};
},
/* eslint-disable vue/no-unused-properties */
/**
* @public
* Note: the default duration historically for HTML5 Apps has been 5 min
*/
defaultDuration() {
return 300;
},
/* eslint-enable vue/no-unused-properties */
},
watch: {
userData(newValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
const Stages = {
SELECT_CLASSROOM: 'SELECT_CLASSROOM',
/* eslint-disable vue/no-unused-properties */
SELECT_GROUPS: 'SELECT_GROUPS',
/* eslint-enable */
};
export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
import commonCoreStrings from 'kolibri/uiText/commonCoreStrings';
import commonCoach from '../../common';
import { useCoachTabs } from '../../../composables/useCoachTabs';
import ReportsControls from '../../common/ReportsControls';
export default {
Expand All @@ -122,13 +121,6 @@
ReportsControls,
},
mixins: [commonCoach, commonCoreStrings],
setup() {
const { saveTabsClick, wereTabsClickedRecently } = useCoachTabs();
return {
saveTabsClick,
wereTabsClickedRecently,
};
},
computed: {
learner() {
return this.learnerMap[this.$route.params.learnerId];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@

<script>
import { computed, toRefs } from 'vue';
import commonCoreStrings from 'kolibri/uiText/commonCoreStrings';
import { ViewMoreButtonStates } from '../../../constants/index';
import LessonContentCard from './LessonContentCard';
Expand All @@ -99,14 +98,8 @@
LessonContentCard,
},
mixins: [commonCoreStrings],
setup(props) {
const { selectAllChecked, selectAllIndeterminate } = toRefs(props);
// Code too long to display in template
const ariaChecked = computed(() => {
return selectAllChecked.value ? true : selectAllIndeterminate.value ? 'mixed' : false;
});
setup() {
return {
ariaChecked,
ViewMoreButtonStates,
};
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@
mixins: [commonCoreStrings, commonCoach],
setup() {
const {
sectionLabel$,
selectAllLabel$,
addSectionLabel$,
quizSectionsLabel$,
Expand All @@ -369,7 +368,6 @@
questionsDeletedNotification$,
expandAll$,
collapseAll$,
questionDeletionConfirmation$,
} = enhancedQuizManagementStrings;
const { upLabel$, downLabel$ } = searchAndFilterStrings;
Expand All @@ -382,7 +380,6 @@
deleteActiveSelectedQuestions,
addSection,
removeSection,
updateQuiz,
selectAllQuestions,
replacementQuestionPool,
// Computed
Expand All @@ -391,7 +388,6 @@
activeSectionIndex,
activeSection,
activeResourceMap,
activeResourcePool,
activeQuestions,
selectedActiveQuestions,
} = injectQuizCreation();
Expand All @@ -403,7 +399,6 @@
return {
dragActive,
sectionLabel$,
expandAll$,
collapseAll$,
selectAllLabel$,
Expand All @@ -415,7 +410,6 @@
addQuizSectionQuestionsInstructions$,
editSectionLabel$,
deleteSectionLabel$,
questionDeletionConfirmation$,
replaceAction$,
questionsLabel$,
numberOfReplacementsAvailable$,
Expand All @@ -431,7 +425,6 @@
deleteActiveSelectedQuestions,
addSection,
removeSection,
updateQuiz,
displaySectionTitle,
displayQuestionTitle,
Expand All @@ -443,7 +436,6 @@
activeSectionIndex,
activeSection,
activeResourceMap,
activeResourcePool,
replacementQuestionPool,
activeQuestions,
selectedActiveQuestions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@
return {
content,
questions,
currentQuestion,
annotatedSections,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
} from 'kolibri-common/strings/enhancedQuizManagementStrings';
import { getCurrentInstance, computed, ref } from 'vue';
import { get } from '@vueuse/core';
import isEqual from 'lodash/isEqual';
import commonCoreStrings from 'kolibri/uiText/commonCoreStrings';
import AccordionItem from 'kolibri-common/components/AccordionItem';
import AccordionContainer from 'kolibri-common/components/AccordionContainer';
Expand All @@ -174,7 +173,6 @@
const {
replaceQuestions$,
deleteSectionLabel$,
replaceAction$,
selectAllLabel$,
closeConfirmationMessage$,
Expand All @@ -185,7 +183,6 @@
numberOfQuestionsReplaced$,
noUndoWarning$,
selectQuestionsToContinue$,
selectFewerQuestion$,
collapseAll$,
expandAll$,
} = enhancedQuizManagementStrings;
Expand All @@ -198,19 +195,9 @@
activeResourceMap,
replacementQuestionPool,
clearSelectedQuestions,
replaceSelectedQuestions,
toggleQuestionInSelection,
handleReplacement,
allSections,
} = injectQuizCreation();
const activeSectionTitle = computed(() => {
const activeSectionIndex = allSections.value.findIndex(section =>
isEqual(JSON.stringify(section), JSON.stringify(activeSection.value)),
);
return displaySectionTitle(activeSection.value, activeSectionIndex);
});
const showCloseConfirmation = ref(false);
const showReplacementConfirmation = ref(false);
const replacements = ref([]);
Expand Down Expand Up @@ -273,8 +260,6 @@
useAccordion(replacementQuestionPool);
return {
createSnackbar,
toggle,
isExpanded,
collapseAll,
Expand All @@ -285,24 +270,20 @@
toggleInReplacements,
activeSection,
activeSectionIndex,
activeSectionTitle,
selectAllReplacementQuestions,
selectedActiveQuestions,
replacementQuestionPool,
selectAllIsIndeterminate,
selectAllIsChecked,
replaceSelectedQuestions,
activeResourceMap,
showCloseConfirmation,
showReplacementConfirmation,
confirmReplacement,
handleConfirmClose,
toggleQuestionInSelection,
submitReplacement,
replacements,
replaceQuestions$,
deleteSectionLabel$,
replaceAction$,
selectAllLabel$,
numberOfSelectedReplacements$,
Expand All @@ -312,7 +293,6 @@
replaceQuestionsExplaination$,
replaceQuestionsHeading$,
selectQuestionsToContinue$,
selectFewerQuestion$,
collapseAll$,
expandAll$,
displayQuestionTitle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
allResourceMap,
updateSection,
addQuestionsToSectionFromResources,
selectAllQuestions,
allQuestionsInQuiz,
activeQuestions,
addSection,
Expand All @@ -268,7 +267,6 @@
const selectPracticeQuiz = computed(() => props.selectPracticeQuiz);
const {
sectionSettings$,
numberOfSelectedBookmarks$,
selectResourcesDescription$,
questionsFromResources$,
Expand Down Expand Up @@ -722,8 +720,6 @@
activeSectionIndex,
activeQuestions,
addSection,
allResourceMap,
allQuestionsInQuiz,
selectAllChecked,
selectAllIndeterminate,
showSelectAll,
Expand All @@ -734,12 +730,9 @@
handleConfirmClose,
handleCancelClose,
topic,
topicId,
contentList,
resources,
showCloseConfirmation,
loading,
hasMore,
loadingMore,
fetchMoreResources,
resetWorkingResourcePool,
Expand All @@ -748,13 +741,11 @@
questionCount,
maxQuestions,
maxSectionQuestionOptions,
MAX_QUESTIONS_PER_QUIZ_SECTION,
workingPoolUnusedQuestions,
disableSave,
cannotSelectSomeTopicWarning$,
closeConfirmationMessage$,
closeConfirmationTitle$,
sectionSettings$,
numberOfQuestionsSelected$,
tooManyQuestions$,
maxNumberOfQuestions$,
Expand All @@ -764,14 +755,10 @@
questionsFromResources$,
windowIsSmall,
bookmarks,
channels,
viewMoreButtonState,
updateSection,
addQuestionsToSectionFromResources,
selectAllQuestions,
workingResourcePool,
addToWorkingResourcePool,
removeFromWorkingResourcePool,
showBookmarks,
selectQuiz$,
numberOfQuestionsToAdd$,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,9 @@
} from 'kolibri-common/strings/enhancedQuizManagementStrings';
import commonCoreStrings from 'kolibri/uiText/commonCoreStrings';
import { MAX_QUESTIONS_PER_QUIZ_SECTION } from 'kolibri/constants';
import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow';
import useSnackbar from 'kolibri/composables/useSnackbar';
import { PageNames } from '../../../constants/index';
import { injectQuizCreation } from '../../../composables/useQuizCreation.js';
import useDrag from './useDrag.js';
export default {
name: 'SectionEditor',
Expand All @@ -153,12 +151,10 @@
sectionSettings$,
sectionTitle$,
sectionTitleUniqueWarning$,
numberOfQuestionsLabel$,
optionalDescriptionLabel$,
numberOfQuestionsSelected$,
deleteSectionLabel$,
applySettings$,
sectionOrder$,
questionOrder$,
randomizedLabel$,
randomizedOptionDescription$,
Expand All @@ -176,16 +172,13 @@
const {
activeSectionIndex,
activeSection,
activeResourcePool,
activeQuestions,
allSections,
updateSection,
updateQuiz,
removeSection,
} = injectQuizCreation();
const { moveDownOne, moveUpOne } = useDrag();
const showCloseConfirmation = ref(false);
function handleCancelClose() {
Expand Down Expand Up @@ -271,8 +264,6 @@
return activeSectionChanged.value || sectionOrderChanged.value;
});
const { windowIsLarge, windowIsSmall } = useKResponsiveWindow();
const resourceButtonLabel = computed(() => {
if (activeQuestions.value.length === 0) {
return addQuestionsLabel$();
Expand Down Expand Up @@ -304,49 +295,35 @@
// useQuizCreation
activeSectionIndex,
activeSection,
activeResourcePool,
activeQuestions,
allSections,
sectionOrderList,
updateSection,
updateQuiz,
handleDeleteSection,
// dragging a11y
moveDownOne,
moveUpOne,
// Form models
learners_see_fixed_order,
description,
section_title,
resourceButtonLabel,
showResourceButton,
maxQuestionsLabel,
// Responsiveness
windowIsLarge,
windowIsSmall,
// i18n
displaySectionTitle,
addQuestionsLabel$,
sectionSettings$,
sectionTitle$,
numberOfQuestionsLabel$,
optionalDescriptionLabel$,
numberOfQuestionsSelected$,
sectionDeletedNotification$,
deleteSectionLabel$,
applySettings$,
closeConfirmationTitle$,
closeConfirmationMessage$,
deleteConfirmation$,
addMoreQuestionsLabel$,
sectionOrder$,
questionOrder$,
randomizedLabel$,
randomizedOptionDescription$,
fixedLabel$,
fixedOptionDescription$,
createSnackbar,
};
},
computed: {
Expand Down
Loading

0 comments on commit 79ab96a

Please sign in to comment.