Skip to content

Commit 86c7b34

Browse files
Merge pull request #15734 from logonoff/OCPBUGS-33487-cycles-tokyo-drift
OCPBUGS-33487: Fix tsconfig so that VSCode can autocomplete imports correctly
2 parents 9604fd3 + 060a4b8 commit 86c7b34

File tree

33 files changed

+113
-83
lines changed

33 files changed

+113
-83
lines changed

frontend/.vscode/settings.json

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
11
{
22
"editor.defaultFormatter": "esbenp.prettier-vscode",
33
"[javascript]": {
4-
"editor.formatOnSave": true,
4+
"editor.formatOnSave": false,
55
"editor.codeActionsOnSave": {
66
"source.organizeImports": "never",
7-
"source.sortImports": "never"
7+
"source.sortImports": "never",
8+
"source.fixAll.eslint": "explicit",
9+
"source.fixAll.ts": "explicit"
810
}
911
},
1012
"[javascriptreact]": {
11-
"editor.formatOnSave": true,
13+
"editor.formatOnSave": false,
1214
"editor.codeActionsOnSave": {
1315
"source.organizeImports": "never",
14-
"source.sortImports": "never"
16+
"source.sortImports": "never",
17+
"source.fixAll.eslint": "explicit",
18+
"source.fixAll.ts": "explicit"
1519
}
1620
},
1721
"[typescript]": {
18-
"editor.formatOnSave": true,
22+
"editor.formatOnSave": false,
1923
"editor.codeActionsOnSave": {
2024
"source.organizeImports": "never",
21-
"source.sortImports": "never"
25+
"source.sortImports": "never",
26+
"source.fixAll.eslint": "explicit",
27+
"source.fixAll.ts": "explicit"
2228
}
2329
},
2430
"[typescriptreact]": {
25-
"editor.formatOnSave": true,
31+
"editor.formatOnSave": false,
2632
"editor.codeActionsOnSave": {
2733
"source.organizeImports": "never",
28-
"source.sortImports": "never"
34+
"source.sortImports": "never",
35+
"source.fixAll.eslint": "explicit",
36+
"source.fixAll.ts": "explicit"
2937
}
3038
},
3139
"[json]": {
@@ -45,6 +53,8 @@
4553
"json",
4654
"graphql"
4755
],
56+
"javascript.preferences.quoteStyle": "single",
57+
"typescript.preferences.quoteStyle": "single",
4858
"javascript.validate.enable": false,
4959
"typescript.tsdk": "./node_modules/typescript/lib",
5060
"search.exclude": {
@@ -77,14 +87,18 @@
7787
},
7888
"json.schemas": [
7989
{
80-
"fileMatch": ["**/console-extensions.json"],
90+
"fileMatch": [
91+
"**/console-extensions.json"
92+
],
8193
"url": "./packages/console-dynamic-plugin-sdk/dist/webpack/schema/console-extensions.json"
8294
}
8395
],
8496
"editor.codeActionsOnSave": {
8597
"source.fixAll.eslint": "explicit"
8698
},
87-
"cucumberautocomplete.steps": ["./packages/*/integration-tests/support/step-definitions/*/*.ts"],
99+
"cucumberautocomplete.steps": [
100+
"./packages/*/integration-tests/support/step-definitions/*/*.ts"
101+
],
88102
"cucumberautocomplete.strictGherkinCompletion": true,
89103
"editor.quickSuggestions": {
90104
"comments": "on",

frontend/packages/console-app/src/components/nodes/node-dashboard/InventoryCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { useK8sWatchResource } from '@console/internal/components/utils/k8s-watc
55
import { resourcePathFromModel } from '@console/internal/components/utils/resource-link';
66
import { PodModel, NodeModel } from '@console/internal/models';
77
import { referenceForModel, K8sResourceCommon, K8sKind } from '@console/internal/module/k8s';
8-
import InventoryItem, {
8+
import {
9+
InventoryItem,
910
ResourceInventoryItem,
1011
StatusGroupMapper,
1112
} from '@console/shared/src/components/dashboard/inventory-card/InventoryItem';

frontend/packages/console-app/src/components/nodes/node-dashboard/UtilizationCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
humanizeDecimalBytesPerSec,
1212
humanizeNumber,
1313
} from '@console/internal/components/utils/units';
14-
import UtilizationBody from '@console/shared/src/components/dashboard/utilization-card/UtilizationBody';
14+
import { UtilizationBody } from '@console/shared/src/components/dashboard/utilization-card/UtilizationBody';
1515
import { UtilizationDurationDropdown } from '@console/shared/src/components/dashboard/utilization-card/UtilizationDurationDropdown';
1616
import { ByteDataTypes } from '@console/shared/src/graph-helper/data-utils';
1717
import { getNodeAddresses } from '@console/shared/src/selectors/node';

frontend/packages/console-app/src/components/pdb/PDBAlert.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,3 @@ export const PDBAlert: React.FC<PDBAlertProps> = ({ namespace }) => {
5656
</>
5757
);
5858
};
59-
60-
export default PDBAlert;

frontend/packages/console-plugin-sdk/src/api/pluginSubscriptionService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as _ from 'lodash';
22
import { Store } from 'redux';
3-
import { RootState } from '@console/internal/redux';
3+
import type { RootState } from '@console/internal/redux';
44
import { isExtensionInUse, PluginStore, DynamicPluginInfo } from '../store';
5-
import { Extension, ExtensionTypeGuard, LoadedExtension } from '../typings';
5+
import type { Extension, ExtensionTypeGuard, LoadedExtension } from '../typings';
66

77
let subscriptionServiceInitialized = false;
88
let getPluginStoreInstance: () => PluginStore = () => undefined;

frontend/packages/console-plugin-sdk/src/api/useExtensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useRef, useCallback, useEffect } from 'react';
22
import * as _ from 'lodash';
33
import { useForceRender } from '@console/shared/src/hooks/useForceRender';
4-
import { Extension, ExtensionTypeGuard, LoadedExtension } from '../typings';
4+
import type { Extension, ExtensionTypeGuard, LoadedExtension } from '../typings';
55
import { useTranslatedExtensions } from '../utils/useTranslatedExtensions';
66
import { subscribeToExtensions } from './pluginSubscriptionService';
77

frontend/packages/console-plugin-sdk/src/utils/extension-i18n.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
PredicateCheck,
55
ValueCallback,
66
} from '@console/dynamic-plugin-sdk/src/utils/object';
7-
import { Extension } from '../typings';
7+
import type { Extension } from '../typings';
88

99
export const isTranslatableString = (value): value is string => {
1010
return (

frontend/packages/console-shared/src/components/dashboard/inventory-card/InventoryItem.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,6 @@ export const ResourceInventoryItem: React.FC<ResourceInventoryItemProps> = ({
295295
);
296296
};
297297

298-
export default InventoryItem;
299-
300298
type StatusGroup = {
301299
[key in InventoryStatusGroup | string]: {
302300
filterType?: string;

frontend/packages/console-shared/src/components/dashboard/utilization-card/UtilizationBody.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,3 @@ export const UtilizationBody: React.FCC<UtilizationBodyProps> = ({ children }) =
6363
</div>
6464
);
6565
};
66-
67-
export default UtilizationBody;

frontend/packages/console-shared/src/hooks/useUserSettings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { useSelector } from 'react-redux';
44
import { UseUserSettings, getImpersonate, getUser } from '@console/dynamic-plugin-sdk';
55
import { useK8sWatchResource } from '@console/internal/components/utils/k8s-watch-hook';
66
import { ConfigMapModel } from '@console/internal/models';
7-
import { K8sResourceKind } from '@console/internal/module/k8s';
8-
import { RootState } from '@console/internal/redux';
7+
import type { K8sResourceKind } from '@console/internal/module/k8s';
8+
import type { RootState } from '@console/internal/redux';
99
import {
1010
createConfigMap,
1111
deserializeData,

0 commit comments

Comments
 (0)