Skip to content

Commit

Permalink
Ran eslint --fix on all packages (#2229)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Sep 19, 2024
1 parent b2fef09 commit bd98271
Show file tree
Hide file tree
Showing 562 changed files with 1,805 additions and 1,835 deletions.
3 changes: 2 additions & 1 deletion packages/app-utils/src/components/AppBootstrap.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import React, { useContext } from 'react';
import { act, render, screen } from '@testing-library/react';
import { AUTH_HANDLER_TYPE_ANONYMOUS } from '@deephaven/auth-plugins';
import { ApiContext } from '@deephaven/jsapi-bootstrap';
import { PluginModuleMap, PluginsContext } from '@deephaven/plugin';
import type { PluginModuleMap } from '@deephaven/plugin';
import { PluginsContext } from '@deephaven/plugin';
import { BROADCAST_LOGIN_MESSAGE } from '@deephaven/jsapi-utils';
import type {
CoreClient,
Expand Down
10 changes: 4 additions & 6 deletions packages/app-utils/src/components/AppDashboards.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import React, { useCallback } from 'react';
import classNames from 'classnames';
import {
DashboardUtils,
DehydratedDashboardPanelProps,
LazyDashboard,
} from '@deephaven/dashboard';
import type { DehydratedDashboardPanelProps } from '@deephaven/dashboard';
import { DashboardUtils, LazyDashboard } from '@deephaven/dashboard';
import { useObjectFetcher } from '@deephaven/jsapi-bootstrap';
import LayoutManager, {
import type {
ItemConfig,
Settings as LayoutSettings,
} from '@deephaven/golden-layout';
import type LayoutManager from '@deephaven/golden-layout';
import { LoadingOverlay } from '@deephaven/components';

interface AppDashboardsProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-utils/src/components/AuthBootstrap.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext, useEffect, useMemo, useState } from 'react';
import type { AuthConfigMap } from '@deephaven/auth-plugins';
import {
AuthConfigMap,
AuthPluginAnonymous,
AuthPluginParent,
AuthPluginPsk,
Expand Down
2 changes: 1 addition & 1 deletion packages/app-utils/src/components/ConnectionBootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
LoadingOverlay,
LoadingSpinner,
} from '@deephaven/components';
import type { ObjectFetchManager } from '@deephaven/jsapi-bootstrap';
import {
ObjectFetcherContext,
ObjectFetchManager,
ObjectFetchManagerContext,
sanitizeVariableDescriptor,
useApi,
Expand Down
3 changes: 2 additions & 1 deletion packages/app-utils/src/plugins/PluginUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LegacyPlugin, Plugin, PluginType } from '@deephaven/plugin';
import type { LegacyPlugin, Plugin } from '@deephaven/plugin';
import { PluginType } from '@deephaven/plugin';
import { getPluginModuleValue } from './PluginUtils';

describe('getPluginModuleValue', () => {
Expand Down
10 changes: 6 additions & 4 deletions packages/app-utils/src/plugins/PluginUtils.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import Log from '@deephaven/log';
import type {
LegacyAuthPlugin,
LegacyPlugin,
Plugin,
PluginModule,
} from '@deephaven/plugin';
import {
type PluginModuleMap,
type AuthPlugin,
type AuthPluginComponent,
isAuthPlugin,
LegacyAuthPlugin,
LegacyPlugin,
Plugin,
PluginType,
isLegacyAuthPlugin,
isLegacyPlugin,
PluginModule,
isPlugin,
} from '@deephaven/plugin';
import loadRemoteModule from './loadRemoteModule';
Expand Down
4 changes: 2 additions & 2 deletions packages/app-utils/src/storage/LayoutStorage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ItemConfig } from '@deephaven/golden-layout';
import { FilterSet, Link } from '@deephaven/dashboard-core-plugins';
import { PluginDataMap } from '@deephaven/redux';
import type { FilterSet, Link } from '@deephaven/dashboard-core-plugins';
import type { PluginDataMap } from '@deephaven/redux';

/**
* Have a different version to support legacy layout exports
Expand Down
4 changes: 2 additions & 2 deletions packages/app-utils/src/storage/LocalWorkspaceStorage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Log from '@deephaven/log';
import {
import type {
WorkspaceStorage,
WorkspaceStorageLoadOptions,
CustomizableWorkspaceData,
Expand All @@ -13,7 +13,7 @@ import {
IntegerColumnFormatter,
} from '@deephaven/jsapi-utils';
import UserLayoutUtils from './UserLayoutUtils';
import LayoutStorage from './LayoutStorage';
import type LayoutStorage from './LayoutStorage';

const log = Log.module('LocalWorkspaceStorage');

Expand Down
5 changes: 3 additions & 2 deletions packages/app-utils/src/storage/UserLayoutUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { FilterSet, Link } from '@deephaven/dashboard-core-plugins';
import type { FilterSet, Link } from '@deephaven/dashboard-core-plugins';
import type { ItemConfig } from '@deephaven/golden-layout';
import LayoutStorage, {
import type {
ExportedLayout,
ExportedLayoutV1,
ExportedLayoutV2,
} from './LayoutStorage';
import type LayoutStorage from './LayoutStorage';
import UserLayoutUtils, {
DEFAULT_LAYOUT_CONFIG,
DEFAULT_LAYOUT_CONFIG_NO_CONSOLE,
Expand Down
11 changes: 4 additions & 7 deletions packages/app-utils/src/storage/UserLayoutUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ import {
LogPanel,
} from '@deephaven/dashboard-core-plugins';
import Log from '@deephaven/log';
import { CustomizableWorkspaceData } from '@deephaven/redux';
import LayoutStorage, {
ExportedLayout,
ExportedLayoutV2,
isLayoutV1,
isLayoutV2,
} from './LayoutStorage';
import type { CustomizableWorkspaceData } from '@deephaven/redux';
import type { ExportedLayout, ExportedLayoutV2 } from './LayoutStorage';
import type LayoutStorage from './LayoutStorage';
import { isLayoutV1, isLayoutV2 } from './LayoutStorage';

const log = Log.module('UserLayoutUtils');

Expand Down
6 changes: 4 additions & 2 deletions packages/app-utils/src/storage/grpc/GrpcFileStorage.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import throttle from 'lodash.throttle';
import {
FileNotFoundError,
import type {
FileStorage,
File,
FileStorageItem,
FileStorageTable,
} from '@deephaven/file-explorer';
import {
FileNotFoundError,
FileUtils,
isFileType,
} from '@deephaven/file-explorer';
Expand Down
13 changes: 5 additions & 8 deletions packages/app-utils/src/storage/grpc/GrpcFileStorageTable.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
/* eslint-disable class-methods-use-this */

import Log from '@deephaven/log';
import {
import type {
StorageTableViewport,
StorageListenerRemover,
ViewportUpdateCallback,
ViewportData,
IndexRange,
StorageSnapshot,
} from '@deephaven/storage';
import {
CancelablePromise,
CanceledPromiseError,
PromiseUtils,
} from '@deephaven/utils';
import {
import type { CancelablePromise } from '@deephaven/utils';
import { CanceledPromiseError, PromiseUtils } from '@deephaven/utils';
import type {
FileStorageItem,
FileStorageTable,
FileUtils,
} from '@deephaven/file-explorer';
import { FileUtils } from '@deephaven/file-explorer';
import type { dh } from '@deephaven/jsapi-types';
import debounce from 'lodash.debounce';

Expand Down
3 changes: 2 additions & 1 deletion packages/app-utils/src/storage/grpc/GrpcLayoutStorage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { dh } from '@deephaven/jsapi-types';
import LayoutStorage, { ExportedLayout } from '../LayoutStorage';
import type { ExportedLayout } from '../LayoutStorage';
import type LayoutStorage from '../LayoutStorage';

export class GrpcLayoutStorage implements LayoutStorage {
readonly storageService: dh.storage.StorageService;
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-plugins/src/AuthPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import type React from 'react';

/**
* Map from auth config keys to their values
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-plugins/src/AuthPluginAnonymous.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { dh } from '@deephaven/jsapi-shim';
import type { CoreClient } from '@deephaven/jsapi-types';
import AuthPluginAnonymous from './AuthPluginAnonymous';
import { AUTH_HANDLER_TYPE_ANONYMOUS as AUTH_TYPE } from './AuthHandlerTypes';
import { AuthConfigMap } from './AuthPlugin';
import type { AuthConfigMap } from './AuthPlugin';

const mockChildText = 'Mock Auth Anonymous Child';
const mockChild = <div>{mockChildText}</div>;
Expand Down
8 changes: 3 additions & 5 deletions packages/auth-plugins/src/AuthPluginAnonymous.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import React, { useCallback } from 'react';
import { useApi } from '@deephaven/jsapi-bootstrap';
import { AUTH_HANDLER_TYPE_ANONYMOUS } from './AuthHandlerTypes';
import { AuthPlugin, AuthPluginProps } from './AuthPlugin';
import type { AuthPlugin, AuthPluginProps } from './AuthPlugin';
import AuthPluginBase from './AuthPluginBase';
import {
UserPermissionsOverride,
UserPermissionsOverrideContext,
} from './UserContexts';
import type { UserPermissionsOverride } from './UserContexts';
import { UserPermissionsOverrideContext } from './UserContexts';

const permissionsOverrides: UserPermissionsOverride = { canLogout: false };

Expand Down
2 changes: 1 addition & 1 deletion packages/auth-plugins/src/AuthPluginParent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { dh } from '@deephaven/jsapi-shim';
import type { CoreClient, LoginOptions } from '@deephaven/jsapi-types';
import { TestUtils } from '@deephaven/test-utils';
import AuthPluginParent from './AuthPluginParent';
import { AuthConfigMap } from './AuthPlugin';
import type { AuthConfigMap } from './AuthPlugin';

let mockParentResponse: Promise<LoginOptions>;
jest.mock('@deephaven/jsapi-utils', () => ({
Expand Down
8 changes: 3 additions & 5 deletions packages/auth-plugins/src/AuthPluginParent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import {
requestParentResponse,
} from '@deephaven/jsapi-utils';
import Log from '@deephaven/log';
import { AuthPlugin, AuthPluginProps } from './AuthPlugin';
import type { AuthPlugin, AuthPluginProps } from './AuthPlugin';
import AuthPluginBase from './AuthPluginBase';
import {
UserPermissionsOverride,
UserPermissionsOverrideContext,
} from './UserContexts';
import type { UserPermissionsOverride } from './UserContexts';
import { UserPermissionsOverrideContext } from './UserContexts';

const log = Log.module('AuthPluginParent');

Expand Down
5 changes: 3 additions & 2 deletions packages/auth-plugins/src/AuthPluginPsk.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { ReactNode } from 'react';
import type { ReactNode } from 'react';
import React from 'react';
import Cookies from 'js-cookie';
import { act, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
Expand All @@ -8,7 +9,7 @@ import { dh } from '@deephaven/jsapi-shim';
import type { CoreClient } from '@deephaven/jsapi-types';
import AuthPluginPsk from './AuthPluginPsk';
import { AUTH_HANDLER_TYPE_PSK as AUTH_TYPE } from './AuthHandlerTypes';
import { AuthConfigMap } from './AuthPlugin';
import type { AuthConfigMap } from './AuthPlugin';

let mockOnBroadcastLogin = jest.fn();
let mockOnBroadcastLogout = jest.fn();
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-plugins/src/AuthPluginPsk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useBroadcastLoginListener } from '@deephaven/jsapi-components';
import Log from '@deephaven/log';
import { getErrorMessage } from '@deephaven/utils';
import Cookies from 'js-cookie';
import { AuthPlugin, AuthPluginProps } from './AuthPlugin';
import type { AuthPlugin, AuthPluginProps } from './AuthPlugin';
import LoginForm from './LoginForm';
import Login from './Login';
import AuthenticationError from './AuthenticationError';
Expand Down
3 changes: 2 additions & 1 deletion packages/auth-plugins/src/LoginForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { LoadingSpinner } from '@deephaven/components';
import classNames from 'classnames';
import React, { FormEventHandler } from 'react';
import type { FormEventHandler } from 'react';
import React from 'react';
import './LoginForm.scss';

export interface LoginFormProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-plugins/src/UserContexts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createContext } from 'react';
import { User, UserPermissions } from '@deephaven/redux';
import type { User, UserPermissions } from '@deephaven/redux';

export type UserOverride = Partial<Omit<User, 'permissions'>>;

Expand Down
2 changes: 1 addition & 1 deletion packages/auth-plugins/src/UserUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { User, UserPermissions } from '@deephaven/redux';
import type { User, UserPermissions } from '@deephaven/redux';
import Log from '@deephaven/log';

const log = Log.module('UserUtils');
Expand Down
24 changes: 10 additions & 14 deletions packages/chart/src/Chart.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
import React, { Component, ReactElement, RefObject } from 'react';
import type { ReactElement, RefObject } from 'react';
import React, { Component } from 'react';
import deepEqual from 'fast-deep-equal';
import memoize from 'memoize-one';
import {
vsLoading,
dhGraphLineDown,
dhWarningFilled,
IconDefinition,
} from '@deephaven/icons';
import {
Formatter,
FormatterUtils,
DateUtils,
import type { IconDefinition } from '@deephaven/icons';
import { vsLoading, dhGraphLineDown, dhWarningFilled } from '@deephaven/icons';
import type {
DateTimeColumnFormatterOptions,
DecimalColumnFormatterOptions,
IntegerColumnFormatterOptions,
FormattingRule,
ColumnFormatSettings,
DateTimeFormatSettings,
} from '@deephaven/jsapi-utils';
import { Formatter, FormatterUtils, DateUtils } from '@deephaven/jsapi-utils';
import Log from '@deephaven/log';
import {
import type {
Config as PlotlyConfig,
Layout,
Icon,
Expand All @@ -34,8 +29,9 @@ import createPlotlyComponent from './plotly/createPlotlyComponent';
import Plotly from './plotly/Plotly';
import ChartModel from './ChartModel';
import ChartErrorOverlay from './ChartErrorOverlay';
import { ChartTheme } from './ChartTheme';
import ChartUtils, { ChartModelSettings } from './ChartUtils';
import type { ChartTheme } from './ChartTheme';
import type { ChartModelSettings } from './ChartUtils';
import ChartUtils from './ChartUtils';
import './Chart.scss';
import DownsamplingError from './DownsamplingError';
import useChartTheme from './useChartTheme';
Expand Down
2 changes: 1 addition & 1 deletion packages/chart/src/ChartErrorOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactElement } from 'react';
import type { ReactElement } from 'react';
import { CopyButton, Button } from '@deephaven/components';
import './ChartErrorOverlay.scss';

Expand Down
4 changes: 2 additions & 2 deletions packages/chart/src/ChartModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* eslint no-unused-vars: "off" */

import type { dh as DhType } from '@deephaven/jsapi-types';
import { Formatter } from '@deephaven/jsapi-utils';
import type { Formatter } from '@deephaven/jsapi-utils';
import type { Layout, Data } from 'plotly.js';
import { FilterColumnMap, FilterMap } from './ChartUtils';
import type { FilterColumnMap, FilterMap } from './ChartUtils';

export type ChartEvent = CustomEvent;

Expand Down
5 changes: 3 additions & 2 deletions packages/chart/src/ChartModelFactory.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { dh as DhType } from '@deephaven/jsapi-types';
import ChartUtils, { ChartModelSettings } from './ChartUtils';
import type { ChartModelSettings } from './ChartUtils';
import ChartUtils from './ChartUtils';
import FigureChartModel from './FigureChartModel';
import ChartModel from './ChartModel';
import type ChartModel from './ChartModel';

class ChartModelFactory {
/**
Expand Down
6 changes: 4 additions & 2 deletions packages/chart/src/ChartThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { createContext, ReactNode, useMemo } from 'react';
import type { ReactNode } from 'react';
import { createContext, useMemo } from 'react';
import { useTheme } from '@deephaven/components';
import defaultChartTheme, { ChartTheme } from './ChartTheme';
import type { ChartTheme } from './ChartTheme';
import defaultChartTheme from './ChartTheme';

export type ChartThemeContextValue = ChartTheme;

Expand Down
2 changes: 1 addition & 1 deletion packages/chart/src/ChartUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dh from '@deephaven/jsapi-shim';
import { Formatter } from '@deephaven/jsapi-utils';
import { Layout } from 'plotly.js';
import type { Layout } from 'plotly.js';
import ChartUtils from './ChartUtils';
import ChartTestUtils from './ChartTestUtils';
import type { ChartTheme } from './ChartTheme';
Expand Down
Loading

0 comments on commit bd98271

Please sign in to comment.