Skip to content

feat: remove unused exports, functions and files #1750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"lint:styles": "stylelint 'src/**/*.{css,scss}'",
"lint:other": "npm run prettier -- --check",
"prettier": "prettier '**/*.{json,yaml,yml,md}'",
"unimported": "npx unimported --no-cache",
"unused": "npx knip --include dependencies,files,exports,types",
Copy link
Member Author

@artemmufazalov artemmufazalov Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unimported is marked as deprecated now in favor of knip. knip can search not only unused files and deps, but also unused exports. When unused export is deleted and function is not used locally, it will be marked by our linter

"package": "rm -rf dist && tsc -p tsconfig.package.json && copyfiles -u 1 'src/**/*.{css,scss,svg}' dist",
"test": "react-app-rewired test",
"eject": "react-scripts eject",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Graph/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function Graph<T>(props: GraphProps<T>) {
return <div id={containerId} ref={containerRef} style={{overflow: 'auto'}} />;
}

export const renderExplainNode = (node: GraphNode): string => {
const renderExplainNode = (node: GraphNode): string => {
const parts = node.name.split('|');
return parts.length > 1 ? parts[1] : node.name;
};
Expand Down
47 changes: 0 additions & 47 deletions src/components/GroupInfo/GroupInfo.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions src/components/GroupInfo/i18n/en.json

This file was deleted.

7 changes: 0 additions & 7 deletions src/components/GroupInfo/i18n/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/components/QuerySettingsDescription/index.ts

This file was deleted.

40 changes: 0 additions & 40 deletions src/components/Tablet/Tablet.scss

This file was deleted.

35 changes: 0 additions & 35 deletions src/components/Tablet/Tablet.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Tablet/index.ts

This file was deleted.

18 changes: 0 additions & 18 deletions src/components/TabletsOverall/TabletsOverall.scss

This file was deleted.

107 changes: 0 additions & 107 deletions src/components/TabletsOverall/TabletsOverall.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/containers/ClusterModeGuard/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/containers/Node/Node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import './Node.scss';

const b = cn('node');

export const STORAGE_ROLE = 'Storage';
const STORAGE_ROLE = 'Storage';

interface NodeProps {
additionalNodesProps?: AdditionalNodesProps;
Expand Down
26 changes: 0 additions & 26 deletions src/containers/Nodes/columns/hooks.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/containers/Nodes/index.ts

This file was deleted.

2 changes: 2 additions & 0 deletions src/containers/Operations/Operations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {useAutoRefreshInterval} from '../../utils/hooks';

import {OperationsControls} from './OperationsControls';
import {getColumns} from './columns';
import {OPERATIONS_SELECTED_COLUMNS_KEY} from './constants';
import i18n from './i18n';
import {b} from './shared';
import {useOperationsQueryParams} from './useOperationsQueryParams';
Expand Down Expand Up @@ -62,6 +63,7 @@ export function Operations({database}: OperationsProps) {
{data ? (
<ResizeableDataTable
columns={getColumns({database, refreshTable: refetch})}
columnsWidthLSKey={OPERATIONS_SELECTED_COLUMNS_KEY}
Copy link
Member Author

@artemmufazalov artemmufazalov Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property was declared, but was not passed

data={filteredOperations}
emptyDataMessage={i18n('title_empty')}
/>
Expand Down
3 changes: 0 additions & 3 deletions src/containers/PDiskPage/shared.ts

This file was deleted.

30 changes: 0 additions & 30 deletions src/containers/ReduxTooltip/ReduxTooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
}

.node-tootltip,
.tabletsOverall-tooltip,
.histogram-tooltip {
padding: 10px;

Expand All @@ -18,35 +17,6 @@
}
}

.json-tooltip {
padding: 20px 20px 20px 0;

&__inspector {
@include mixins.json-tree-styles();

:not(.json-inspector__leaf_expanded).json-inspector__leaf_composite:before {
content: '';
}
.json-inspector__leaf_expanded.json-inspector__leaf_composite:before {
content: '';
}

& .json-inspector {
&__line:hover:after {
background: transparent;
}
&__show-original:hover:after,
&__show-original:hover:before {
color: transparent;
}

&__value_helper {
display: none;
}
}
}
}

.cell-tooltip {
padding: 10px;

Expand Down
Loading
Loading