Skip to content

Commit

Permalink
Fix some lint problems
Browse files Browse the repository at this point in the history
  • Loading branch information
ya-erm committed Nov 18, 2023
1 parent 10244d5 commit 85ca395
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/lib/calc/calculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export const calculate = (expression: string, previous: number | null) => {
}
switch (token.type) {
case 'number': {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
accumulator = parseFloat(token.value!);
return;
}
Expand All @@ -177,6 +178,7 @@ export const calculate = (expression: string, previous: number | null) => {
}
switch (leftOperand.type) {
case 'number': {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const value = parseFloat(leftOperand.value!);
const result = performOperation(operation, value, accumulator ?? 0);
accumulator = result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
export let draggable = false;
export let editable = true;
// TODO: on grouping click
export let onClick: (grouping: Grouping) => void = () => console.log('onClick', grouping);
const handleClick = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/categories/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { page } from '$app/stores';
import { categoriesService, categoriesStore } from '$lib/data';
import type { Category, CategoryType } from '$lib/data/interfaces';
import type { Category } from '$lib/data/interfaces';
import { translate } from '$lib/translate';
import { useRightButton, useTitle } from '$lib/ui/header';
import { deleteSearchParam, getSearchParam } from '$lib/utils';
Expand Down
9 changes: 5 additions & 4 deletions src/routes/settings/logs/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<script lang="ts">
import dayjs from 'dayjs';
import { LogLevel, Logger, logs } from '$lib/utils/logger';
import Tags from '$lib/ui/Tags.svelte';
import { onMount } from 'svelte';
import InputLabel from '$lib/ui/InputLabel.svelte';
import { translate } from '$lib/translate';
import Button from '$lib/ui/Button.svelte';
import Icon from '$lib/ui/Icon.svelte';
import { translate } from '$lib/translate';
import InputLabel from '$lib/ui/InputLabel.svelte';
import Tags from '$lib/ui/Tags.svelte';
import { LogLevel, logs } from '$lib/utils/logger';
let filtersVisible = false;
Expand Down
2 changes: 2 additions & 0 deletions src/routes/v1/accounts/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import { onDestroy, onMount } from 'svelte';
Expand Down
2 changes: 2 additions & 0 deletions src/routes/v1/settings/migrate/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import {
accountsService,
categoriesService,
Expand Down

0 comments on commit 85ca395

Please sign in to comment.