Skip to content

Commit 29451f3

Browse files
committed
Try to appease codacity again
1 parent 96cd50d commit 29451f3

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/Types.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-unused-vars */
12
import type { NanoPopPosition } from 'nanopop';
23

34
/**
@@ -143,12 +144,10 @@ export interface VTourExposedMethods {
143144
stopTour: () => void;
144145

145146
/** Navigate to a specific step by index */
146-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
147-
goToStep: (stepIndex: number) => Promise<void>;
147+
goToStep: (index: number) => Promise<void>;
148148

149149
/** Reset tour state and optionally restart */
150-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
151-
resetTour: (shouldRestart?: boolean) => void;
150+
resetTour: (restart?: boolean) => void;
152151

153152
/** Update tooltip position */
154153
updatePosition: () => Promise<void>;

src/components/VTour.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ const stopTour = (): void => {
110110
tooltip.value?.setAttribute('data-hidden', '');
111111
};
112112
113-
const resetTour = (shouldRestart = false): void => {
113+
const resetTour = (restart = false): void => {
114114
stopTour();
115115
currentStepIndex.value = 0;
116116
lastStepIndex.value = 0;
117117
nextStepIndex.value = 1;
118118
localStorage.removeItem(saveKey.value);
119-
if (shouldRestart) startTour();
119+
if (restart) startTour();
120120
};
121121
122122
const nextStep = async (): Promise<void> => {
@@ -155,16 +155,16 @@ const endTour = (): void => {
155155
emit('onTourEnd');
156156
};
157157
158-
const goToStep = async (stepIndex: number): Promise<void> => {
159-
if (stepIndex < 0 || stepIndex >= props.steps.length) {
160-
console.warn(`Invalid step index: ${stepIndex}`);
158+
const goToStep = async (index: number): Promise<void> => {
159+
if (index < 0 || index >= props.steps.length) {
160+
console.warn(`Invalid step index: ${index}`);
161161
return;
162162
}
163163
164-
await beforeStep(stepIndex);
165-
currentStepIndex.value = stepIndex;
166-
lastStepIndex.value = Math.max(stepIndex - 1, 0);
167-
nextStepIndex.value = stepIndex + 1;
164+
await beforeStep(index);
165+
currentStepIndex.value = index;
166+
lastStepIndex.value = Math.max(index - 1, 0);
167+
nextStepIndex.value = index + 1;
168168
await updatePosition();
169169
};
170170

vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default defineConfig({
3636
defineModel: true,
3737
},
3838
}),
39+
// @ts-ignore: dts plugin configuration
3940
dts({
4041
insertTypesEntry: true,
4142
cleanVueFileName: true,

0 commit comments

Comments
 (0)