Skip to content

Commit 2744f97

Browse files
authored
refactor: Added consistent-type-imports eslint rule and ran --fix (#2230)
- Added `@typescript-eslint/consistent-type-imports` linting rule - Added package script `lint:packages` - Ran `npm run lint:packages -- --fix` > Note: despite the crazy large number of files, most of these were changed automatically by eslint --fix, so should be able to skim provided all automated tests pass. resolves #2229 BREAKING CHANGE: eslint rule will require type only imports where possible
1 parent 96e3d43 commit 2744f97

File tree

564 files changed

+1917
-1672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

564 files changed

+1917
-1672
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"build:profile": "lerna run build --stream --profile",
3232
"build:necessary": "lerna run build --scope=@deephaven/icons",
3333
"analyze": "lerna run analyze",
34+
"lint:packages": "eslint \"packages/*/src/**/*.{ts,tsx,js,jsx}\"",
3435
"preview": "lerna run --scope=@deephaven/{code-studio,embed-widget} preview --stream",
3536
"preview:app": "lerna run --scope=@deephaven/code-studio preview --stream",
3637
"prestart": "npm run build:necessary",

packages/app-utils/src/components/AppBootstrap.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useContext } from 'react';
22
import { act, render, screen } from '@testing-library/react';
33
import { AUTH_HANDLER_TYPE_ANONYMOUS } from '@deephaven/auth-plugins';
44
import { ApiContext } from '@deephaven/jsapi-bootstrap';
5-
import { PluginModuleMap, PluginsContext } from '@deephaven/plugin';
5+
import { type PluginModuleMap, PluginsContext } from '@deephaven/plugin';
66
import { BROADCAST_LOGIN_MESSAGE } from '@deephaven/jsapi-utils';
77
import type {
88
CoreClient,

packages/app-utils/src/components/AppDashboards.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import React, { useCallback } from 'react';
22
import classNames from 'classnames';
33
import {
44
DashboardUtils,
5-
DehydratedDashboardPanelProps,
5+
type DehydratedDashboardPanelProps,
66
LazyDashboard,
77
} from '@deephaven/dashboard';
88
import { useObjectFetcher } from '@deephaven/jsapi-bootstrap';
9-
import LayoutManager, {
10-
ItemConfig,
11-
Settings as LayoutSettings,
9+
import {
10+
type ItemConfig,
11+
type Settings as LayoutSettings,
1212
} from '@deephaven/golden-layout';
13+
import type LayoutManager from '@deephaven/golden-layout';
1314
import { LoadingOverlay } from '@deephaven/components';
1415

1516
interface AppDashboardsProps {

packages/app-utils/src/components/AuthBootstrap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useContext, useEffect, useMemo, useState } from 'react';
22
import {
3-
AuthConfigMap,
3+
type AuthConfigMap,
44
AuthPluginAnonymous,
55
AuthPluginParent,
66
AuthPluginPsk,

packages/app-utils/src/components/ConnectionBootstrap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from '@deephaven/components';
99
import {
1010
ObjectFetcherContext,
11-
ObjectFetchManager,
11+
type ObjectFetchManager,
1212
ObjectFetchManagerContext,
1313
sanitizeVariableDescriptor,
1414
useApi,

packages/app-utils/src/plugins/PluginUtils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LegacyPlugin, Plugin, PluginType } from '@deephaven/plugin';
1+
import { type LegacyPlugin, type Plugin, PluginType } from '@deephaven/plugin';
22
import { getPluginModuleValue } from './PluginUtils';
33

44
describe('getPluginModuleValue', () => {

packages/app-utils/src/plugins/PluginUtils.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import {
44
type AuthPlugin,
55
type AuthPluginComponent,
66
isAuthPlugin,
7-
LegacyAuthPlugin,
8-
LegacyPlugin,
9-
Plugin,
7+
type LegacyAuthPlugin,
8+
type LegacyPlugin,
9+
type Plugin,
1010
PluginType,
1111
isLegacyAuthPlugin,
1212
isLegacyPlugin,
13-
PluginModule,
13+
type PluginModule,
1414
isPlugin,
1515
} from '@deephaven/plugin';
1616
import loadRemoteModule from './loadRemoteModule';

packages/app-utils/src/storage/LayoutStorage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { ItemConfig } from '@deephaven/golden-layout';
2-
import { FilterSet, Link } from '@deephaven/dashboard-core-plugins';
3-
import { PluginDataMap } from '@deephaven/redux';
2+
import { type FilterSet, type Link } from '@deephaven/dashboard-core-plugins';
3+
import { type PluginDataMap } from '@deephaven/redux';
44

55
/**
66
* Have a different version to support legacy layout exports

packages/app-utils/src/storage/LocalWorkspaceStorage.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import Log from '@deephaven/log';
22
import {
3-
WorkspaceStorage,
4-
WorkspaceStorageLoadOptions,
5-
CustomizableWorkspaceData,
6-
CustomizableWorkspace,
7-
WorkspaceSettings,
8-
ServerConfigValues,
3+
type WorkspaceStorage,
4+
type WorkspaceStorageLoadOptions,
5+
type CustomizableWorkspaceData,
6+
type CustomizableWorkspace,
7+
type WorkspaceSettings,
8+
type ServerConfigValues,
99
} from '@deephaven/redux';
1010
import {
1111
DateTimeColumnFormatter,
1212
DecimalColumnFormatter,
1313
IntegerColumnFormatter,
1414
} from '@deephaven/jsapi-utils';
1515
import UserLayoutUtils from './UserLayoutUtils';
16-
import LayoutStorage from './LayoutStorage';
16+
import type LayoutStorage from './LayoutStorage';
1717

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

packages/app-utils/src/storage/UserLayoutUtils.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { FilterSet, Link } from '@deephaven/dashboard-core-plugins';
1+
import { type FilterSet, type Link } from '@deephaven/dashboard-core-plugins';
22
import type { ItemConfig } from '@deephaven/golden-layout';
3-
import LayoutStorage, {
4-
ExportedLayout,
5-
ExportedLayoutV1,
6-
ExportedLayoutV2,
3+
import {
4+
type ExportedLayout,
5+
type ExportedLayoutV1,
6+
type ExportedLayoutV2,
77
} from './LayoutStorage';
8+
import type LayoutStorage from './LayoutStorage';
89
import UserLayoutUtils, {
910
DEFAULT_LAYOUT_CONFIG,
1011
DEFAULT_LAYOUT_CONFIG_NO_CONSOLE,

0 commit comments

Comments
 (0)