Skip to content

Conversation

@artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Dec 12, 2024

  • Added command, that searches for unused code
  • Removed unused code
  • Removed unused imports
  • Added some imports to lib.ts - everything should be imported from there, when app is used as package

There are still unused exports and files, I didn't delete everything

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
222 221 0 1 0

😟 No changes in tests. 😕

Bundle Size: 🔽

Current: 65.84 MB | Main: 65.86 MB
Diff: 0.01 MB (-0.02%)

✅ Bundle size decreased.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

"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

{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

Comment on lines +19 to +22
const b = cn('ydb-storage-nodes');

const getRowUnavailableClassName = (row: PreparedStorageNode) =>
b('node', {unavailable: isUnavailableNode(row)});
Copy link
Member Author

Choose a reason for hiding this comment

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

Code from StorageNodes/shared.ts

import i18n from './i18n';
import {getRowUnavailableClassName} from './shared';

import './StorageNodes.scss';
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.

File was not imported, so unavailable nodes weren't grey

currentHoveredRef: undefined,
data: undefined,
templateType: 'pool',
templateType: 'cell',
Copy link
Member Author

Choose a reason for hiding this comment

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

Our redux tooltip requires some initial value to be set

@artemmufazalov artemmufazalov added this pull request to the merge queue Dec 12, 2024
Merged via the queue into main with commit cdf9ebc Dec 12, 2024
8 checks passed
@artemmufazalov artemmufazalov deleted the remove-unused branch December 12, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants