fix: remove unused imports and variables (part 1 — packages & non-web-core) (#8751)
* fix: remove unused imports and variables (part 1) Resolve oxlint no-unused-vars warnings in packages/*, apps/admin, apps/space, apps/live, and apps/web (non-core). * fix: resolve CI check failures * fix: resolve check:types failures * fix: resolve check:types and check:format failures - Use destructuring alias for activeCycleResolvedPath - Format propel tab-navigation file * fix: format propel button helper with oxfmt Reorder Tailwind classes to match oxfmt canonical ordering.
This commit is contained in:
parent
c3c7c72aff
commit
d9695afcdc
95 changed files with 71 additions and 145 deletions
|
|
@ -95,6 +95,6 @@ export function HydrateFallback() {
|
|||
);
|
||||
}
|
||||
|
||||
export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
|
||||
export function ErrorBoundary({ error: _error }: Route.ErrorBoundaryProps) {
|
||||
return <ErrorPage />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export type TEditorFlaggingHookReturnType = {
|
|||
/**
|
||||
* @description extensions disabled in various editors
|
||||
*/
|
||||
export const useEditorFlagging = (anchor: string): TEditorFlaggingHookReturnType => ({
|
||||
export const useEditorFlagging = (_anchor: string): TEditorFlaggingHookReturnType => ({
|
||||
document: {
|
||||
disabled: [],
|
||||
flagged: [],
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { action, makeObservable, observable, runInAction } from "mobx";
|
|||
import { SitesCycleService } from "@plane/services";
|
||||
import type { TPublicCycle } from "@/types/cycle";
|
||||
// store
|
||||
import type { CoreRootStore } from "./root.store";
|
||||
import type { RootStore } from "./root.store";
|
||||
|
||||
export interface ICycleStore {
|
||||
// observables
|
||||
|
|
@ -23,9 +23,9 @@ export interface ICycleStore {
|
|||
export class CycleStore implements ICycleStore {
|
||||
cycles: TPublicCycle[] | undefined = undefined;
|
||||
cycleService: SitesCycleService;
|
||||
rootStore: CoreRootStore;
|
||||
rootStore: RootStore;
|
||||
|
||||
constructor(_rootStore: CoreRootStore) {
|
||||
constructor(_rootStore: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observables
|
||||
cycles: observable,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import type {
|
|||
} from "@plane/types";
|
||||
// types
|
||||
import type { IIssue, TIssuesResponse } from "@/types/issue";
|
||||
import type { CoreRootStore } from "../root.store";
|
||||
import type { RootStore } from "../root.store";
|
||||
// constants
|
||||
// helpers
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore {
|
|||
// root store
|
||||
rootIssueStore;
|
||||
|
||||
constructor(_rootStore: CoreRootStore) {
|
||||
constructor(_rootStore: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observable
|
||||
loader: observable,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { observable, action, makeObservable, runInAction } from "mobx";
|
|||
import { InstanceService } from "@plane/services";
|
||||
import type { IInstance, IInstanceConfig } from "@plane/types";
|
||||
// store
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
import type { RootStore } from "@/store/root.store";
|
||||
|
||||
type TError = {
|
||||
status: string;
|
||||
|
|
@ -40,7 +40,7 @@ export class InstanceStore implements IInstanceStore {
|
|||
// services
|
||||
instanceService;
|
||||
|
||||
constructor(private store: CoreRootStore) {
|
||||
constructor(private store: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observable
|
||||
isLoading: observable.ref,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { SitesFileService, SitesIssueService } from "@plane/services";
|
|||
import type { TFileSignedURLResponse, TIssuePublicComment } from "@plane/types";
|
||||
import { EFileAssetType } from "@plane/types";
|
||||
// store
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
import type { RootStore } from "@/store/root.store";
|
||||
// types
|
||||
import type { IIssue, IPeekMode, IVote } from "@/types/issue";
|
||||
|
||||
|
|
@ -60,12 +60,12 @@ export class IssueDetailStore implements IIssueDetailStore {
|
|||
[key: string]: IIssue;
|
||||
} = {};
|
||||
// root store
|
||||
rootStore: CoreRootStore;
|
||||
rootStore: RootStore;
|
||||
// services
|
||||
issueService: SitesIssueService;
|
||||
fileService: SitesFileService;
|
||||
|
||||
constructor(_rootStore: CoreRootStore) {
|
||||
constructor(_rootStore: RootStore) {
|
||||
makeObservable(this, {
|
||||
loader: observable.ref,
|
||||
error: observable.ref,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { computedFn } from "mobx-utils";
|
|||
import { ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@plane/constants";
|
||||
import type { IssuePaginationOptions, TIssueParams } from "@plane/types";
|
||||
// store
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
import type { RootStore } from "@/store/root.store";
|
||||
// types
|
||||
import type {
|
||||
TIssueLayoutOptions,
|
||||
|
|
@ -60,7 +60,7 @@ export class IssueFilterStore implements IIssueFilterStore {
|
|||
};
|
||||
filters: { [anchor: string]: TIssueFilters } | undefined = undefined;
|
||||
|
||||
constructor(private store: CoreRootStore) {
|
||||
constructor(private store: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observables
|
||||
layoutOptions: observable,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { action, makeObservable, runInAction } from "mobx";
|
|||
import { SitesIssueService } from "@plane/services";
|
||||
import type { IssuePaginationOptions, TLoader } from "@plane/types";
|
||||
// store
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
import type { RootStore } from "@/store/root.store";
|
||||
// types
|
||||
import { BaseIssuesStore } from "./helpers/base-issues.store";
|
||||
import type { IBaseIssuesStore } from "./helpers/base-issues.store";
|
||||
|
|
@ -28,11 +28,11 @@ export interface IIssueStore extends IBaseIssuesStore {
|
|||
|
||||
export class IssueStore extends BaseIssuesStore implements IIssueStore {
|
||||
// root store
|
||||
rootStore: CoreRootStore;
|
||||
rootStore: RootStore;
|
||||
// services
|
||||
issueService: SitesIssueService;
|
||||
|
||||
constructor(_rootStore: CoreRootStore) {
|
||||
constructor(_rootStore: RootStore) {
|
||||
super(_rootStore);
|
||||
makeObservable(this, {
|
||||
// actions
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { action, computed, makeObservable, observable, runInAction } from "mobx"
|
|||
import { SitesLabelService } from "@plane/services";
|
||||
import type { IIssueLabel } from "@plane/types";
|
||||
// store
|
||||
import type { CoreRootStore } from "./root.store";
|
||||
import type { RootStore } from "./root.store";
|
||||
|
||||
export interface IIssueLabelStore {
|
||||
// observables
|
||||
|
|
@ -25,9 +25,9 @@ export interface IIssueLabelStore {
|
|||
export class LabelStore implements IIssueLabelStore {
|
||||
labelMap: Record<string, IIssueLabel> = {};
|
||||
labelService: SitesLabelService;
|
||||
rootStore: CoreRootStore;
|
||||
rootStore: RootStore;
|
||||
|
||||
constructor(_rootStore: CoreRootStore) {
|
||||
constructor(_rootStore: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observables
|
||||
labelMap: observable,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { action, computed, makeObservable, observable, runInAction } from "mobx"
|
|||
// plane imports
|
||||
import { SitesMemberService } from "@plane/services";
|
||||
import type { TPublicMember } from "@/types/member";
|
||||
import type { CoreRootStore } from "./root.store";
|
||||
import type { RootStore } from "./root.store";
|
||||
|
||||
export interface IIssueMemberStore {
|
||||
// observables
|
||||
|
|
@ -24,9 +24,9 @@ export interface IIssueMemberStore {
|
|||
export class MemberStore implements IIssueMemberStore {
|
||||
memberMap: Record<string, TPublicMember> = {};
|
||||
memberService: SitesMemberService;
|
||||
rootStore: CoreRootStore;
|
||||
rootStore: RootStore;
|
||||
|
||||
constructor(_rootStore: CoreRootStore) {
|
||||
constructor(_rootStore: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observables
|
||||
memberMap: observable,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { SitesModuleService } from "@plane/services";
|
|||
// types
|
||||
import type { TPublicModule } from "@/types/modules";
|
||||
// root store
|
||||
import type { CoreRootStore } from "./root.store";
|
||||
import type { RootStore } from "./root.store";
|
||||
|
||||
export interface IIssueModuleStore {
|
||||
// observables
|
||||
|
|
@ -26,9 +26,9 @@ export interface IIssueModuleStore {
|
|||
export class ModuleStore implements IIssueModuleStore {
|
||||
moduleMap: Record<string, TPublicModule> = {};
|
||||
moduleService: SitesModuleService;
|
||||
rootStore: CoreRootStore;
|
||||
rootStore: RootStore;
|
||||
|
||||
constructor(_rootStore: CoreRootStore) {
|
||||
constructor(_rootStore: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observables
|
||||
moduleMap: observable,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { UserService } from "@plane/services";
|
|||
import type { TUserProfile } from "@plane/types";
|
||||
import { EStartOfTheWeek } from "@plane/types";
|
||||
// store
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
import type { RootStore } from "@/store/root.store";
|
||||
|
||||
type TError = {
|
||||
status: string;
|
||||
|
|
@ -64,7 +64,7 @@ export class ProfileStore implements IProfileStore {
|
|||
// services
|
||||
userService: UserService;
|
||||
|
||||
constructor(public store: CoreRootStore) {
|
||||
constructor(public store: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observables
|
||||
isLoading: observable.ref,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type {
|
|||
TProjectPublishViewProps,
|
||||
} from "@plane/types";
|
||||
// store
|
||||
import type { CoreRootStore } from "../root.store";
|
||||
import type { RootStore } from "../root.store";
|
||||
|
||||
export interface IPublishStore extends TProjectPublishSettings {
|
||||
// computed
|
||||
|
|
@ -45,7 +45,7 @@ export class PublishStore implements IPublishStore {
|
|||
workspace_detail: IWorkspaceLite | undefined;
|
||||
|
||||
constructor(
|
||||
private store: CoreRootStore,
|
||||
private store: RootStore,
|
||||
publishSettings: TProjectPublishSettings
|
||||
) {
|
||||
this.anchor = publishSettings.anchor;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { SitesProjectPublishService } from "@plane/services";
|
|||
import type { TProjectPublishSettings } from "@plane/types";
|
||||
// store
|
||||
import { PublishStore } from "@/store/publish/publish.store";
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
import type { RootStore } from "@/store/root.store";
|
||||
|
||||
export interface IPublishListStore {
|
||||
// observables
|
||||
|
|
@ -26,7 +26,7 @@ export class PublishListStore implements IPublishListStore {
|
|||
// service
|
||||
publishService;
|
||||
|
||||
constructor(private rootStore: CoreRootStore) {
|
||||
constructor(private rootStore: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observables
|
||||
publishMap: observable,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import type { IState } from "@plane/types";
|
|||
// helpers
|
||||
import { sortStates } from "@/helpers/state.helper";
|
||||
// store
|
||||
import type { CoreRootStore } from "./root.store";
|
||||
import type { RootStore } from "./root.store";
|
||||
|
||||
export interface IStateStore {
|
||||
// observables
|
||||
|
|
@ -28,9 +28,9 @@ export interface IStateStore {
|
|||
export class StateStore implements IStateStore {
|
||||
states: IState[] | undefined = undefined;
|
||||
stateService: SitesStateService;
|
||||
rootStore: CoreRootStore;
|
||||
rootStore: RootStore;
|
||||
|
||||
constructor(_rootStore: CoreRootStore) {
|
||||
constructor(_rootStore: RootStore) {
|
||||
makeObservable(this, {
|
||||
// observables
|
||||
states: observable,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type { ActorDetail, IUser } from "@plane/types";
|
|||
import type { IProfileStore } from "@/store/profile.store";
|
||||
import { ProfileStore } from "@/store/profile.store";
|
||||
// store
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
import type { RootStore } from "@/store/root.store";
|
||||
|
||||
type TUserErrorStatus = {
|
||||
status: string;
|
||||
|
|
@ -50,7 +50,7 @@ export class UserStore implements IUserStore {
|
|||
// service
|
||||
userService: UserService;
|
||||
|
||||
constructor(private store: CoreRootStore) {
|
||||
constructor(private store: RootStore) {
|
||||
// stores
|
||||
this.profile = new ProfileStore(store);
|
||||
// service
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue