Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekshourya29 committed Sep 25, 2024
1 parent f907012 commit 73cdbde
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions web/core/layouts/auth-layout/project-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { FC, ReactNode } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
import useSWR from "swr";
import useSWRImmutable from "swr/immutable";

// components
import { JoinProject } from "@/components/auth-screens";
Expand All @@ -23,10 +22,11 @@ import {
useProjectView,
useUserPermissions,
} from "@/hooks/store";
// local
import { persistence } from "@/local-db/storage.sqlite";
// plane web constants
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions";
// images
import { persistence } from "@/local-db/storage.sqlite";
import emptyProject from "@/public/empty-state/onboarding/dashboard-light.webp";

interface IProjectAuthWrapper {
Expand Down
3 changes: 2 additions & 1 deletion web/core/layouts/auth-layout/workspace-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ import { LogoSpinner } from "@/components/common";
import { useMember, useProject, useUser, useUserPermissions, useWorkspace } from "@/hooks/store";
import { useFavorite } from "@/hooks/store/use-favorite";
import { usePlatformOS } from "@/hooks/use-platform-os";
// local
import { persistence } from "@/local-db/storage.sqlite";
// constants
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions";
// images
import { persistence } from "@/local-db/storage.sqlite";
import PlaneBlackLogo from "@/public/plane-logos/black-horizontal-with-blue-logo.png";
import PlaneWhiteLogo from "@/public/plane-logos/white-horizontal-with-blue-logo.png";
import WorkSpaceNotAvailable from "@/public/workspace/workspace-not-available.png";
Expand Down
2 changes: 1 addition & 1 deletion web/core/lib/polyfills/requestIdleCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if (typeof window !== "undefined" && window) {
window.requestIdleCallback =
window.requestIdleCallback ??
function (cb) {
var start = Date.now();
const start = Date.now();
return setTimeout(function () {
cb({
didTimeout: false,
Expand Down
2 changes: 1 addition & 1 deletion web/core/local-db/storage.sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class Storage {
try {
const storageManager = window.navigator.storage;
const fileSystemDirectoryHandle = await storageManager.getDirectory();
//@ts-expect-error
//@ts-expect-error , clear local issue cache
await fileSystemDirectoryHandle.remove({ recursive: true });
} catch (e) {
console.error("Error clearing sqlite sync storage", e);
Expand Down
4 changes: 1 addition & 3 deletions web/core/local-db/utils/query.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ export const getMetaKeysFragment = (queries: any) => {
}
});

let sql;

sql = ` ('${Array.from(fields).join("','")}')`;
const sql = ` ('${Array.from(fields).join("','")}')`;

return sql;
};
Expand Down
1 change: 1 addition & 0 deletions web/core/store/project/project.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ export class ProjectStore implements IProjectStore {
} catch (error) {
console.log("Failed to delete project from project store");
this.fetchProjects(workspaceSlug);
throw error;
}
};

Expand Down
2 changes: 1 addition & 1 deletion web/core/store/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { TUserPermissions } from "@plane/types/src/enums";
import { API_BASE_URL } from "@/helpers/common.helper";
// local
import { persistence } from "@/local-db/storage.sqlite";
import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues";
import { EUserPermissions } from "@/plane-web/constants/user-permissions";
// services
import { AuthService } from "@/services/auth.service";
Expand All @@ -19,7 +20,6 @@ import { IAccountStore } from "@/store/user/account.store";
import { ProfileStore, IUserProfileStore } from "@/store/user/profile.store";
import { IUserPermissionStore, UserPermissionStore } from "./permissions.store";
import { IUserSettingsStore, UserSettingsStore } from "./settings.store";
import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues";

type TUserErrorStatus = {
status: string;
Expand Down
8 changes: 4 additions & 4 deletions web/core/store/user/profile.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ export class ProfileStore implements IUserProfileStore {

// helper action
mutateUserProfile = (data: Partial<TUserProfile>) => {
if (!data) return
if (!data) return;
Object.entries(data).forEach(([key, value]) => {
if (key in this.data) set(this.data, key, value);
})
}
});
};

// actions
/**
Expand Down Expand Up @@ -129,7 +129,7 @@ export class ProfileStore implements IUserProfileStore {
}
const userProfile = await this.userService.updateCurrentUserProfile(data);
return userProfile;
} catch (error) {
} catch {
if (currentUserProfileData) {
this.mutateUserProfile(currentUserProfileData);
}
Expand Down

0 comments on commit 73cdbde

Please sign in to comment.