mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-25 08:09:41 +02:00
fix: eslint errors and failing tests (#2078)
* fix eslint errors * fix failing tests
This commit is contained in:
parent
7c766af848
commit
5dc253799d
9 changed files with 35 additions and 29 deletions
|
@ -95,7 +95,6 @@ export default defineComponent({
|
|||
const domMadeThisForm = ref<VForm>();
|
||||
const newTimelineEvent = ref<RecipeTimelineEventIn>({
|
||||
// @ts-expect-error - TS doesn't like the $auth global user attribute
|
||||
// eslint-disable-next-line
|
||||
subject: i18n.t("recipe.user-made-this", { user: $auth.user.fullName } as string),
|
||||
eventType: "comment",
|
||||
eventMessage: "",
|
||||
|
|
|
@ -455,10 +455,8 @@ export default defineComponent({
|
|||
correctedRect.startY - state.imagePosition.dy < element.top * state.imagePosition.scale &&
|
||||
correctedRect.startX - state.imagePosition.dx < element.left * state.imagePosition.scale &&
|
||||
correctedRect.startX + correctedRect.w >
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||
(element.left + element.width) * state.imagePosition.scale + state.imagePosition.dx &&
|
||||
correctedRect.startY + correctedRect.h >
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||
(element.top + element.height) * state.imagePosition.scale + state.imagePosition.dy
|
||||
)
|
||||
.map((element, index, array) => {
|
||||
|
@ -470,7 +468,6 @@ export default defineComponent({
|
|||
) {
|
||||
separator = "\n";
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||
return element.text + separator;
|
||||
})
|
||||
.join("");
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, toRef } from "@nuxtjs/composition-api";
|
||||
import { defineComponent, toRef, useContext } from "@nuxtjs/composition-api";
|
||||
import { usePasswordStrength } from "~/composables/use-passwords";
|
||||
|
||||
export default defineComponent({
|
||||
|
@ -25,8 +25,9 @@ export default defineComponent({
|
|||
},
|
||||
setup(props) {
|
||||
const asRef = toRef(props, "value");
|
||||
const { i18n } = useContext();
|
||||
|
||||
const pwStrength = usePasswordStrength(asRef);
|
||||
const pwStrength = usePasswordStrength(asRef, i18n);
|
||||
|
||||
return {
|
||||
pwStrength,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue