-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: remove unused exports, functions and files #1750
Conversation
b62bff4
to
2c871be
Compare
@@ -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", |
There was a problem hiding this comment.
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
@@ -62,6 +63,7 @@ export function Operations({database}: OperationsProps) { | |||
{data ? ( | |||
<ResizeableDataTable | |||
columns={getColumns({database, refreshTable: refetch})} | |||
columnsWidthLSKey={OPERATIONS_SELECTED_COLUMNS_KEY} |
There was a problem hiding this comment.
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
const b = cn('ydb-storage-nodes'); | ||
|
||
const getRowUnavailableClassName = (row: PreparedStorageNode) => | ||
b('node', {unavailable: isUnavailableNode(row)}); |
There was a problem hiding this comment.
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 {StorageNodesEmptyDataMessage} from './StorageNodesEmptyDataMessage'; | ||
import {STORAGE_NODES_COLUMNS_WIDTH_LS_KEY} from './columns/constants'; | ||
import type {StorageNodesColumn} from './columns/types'; | ||
import {getStorageNodes} from './getNodes'; | ||
import i18n from './i18n'; | ||
import {getRowUnavailableClassName} from './shared'; | ||
|
||
import './StorageNodes.scss'; |
There was a problem hiding this comment.
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
@@ -15,7 +15,7 @@ const initialState: ITooltipState = { | |||
toolTipVisible: false, | |||
currentHoveredRef: undefined, | |||
data: undefined, | |||
templateType: 'pool', | |||
templateType: 'cell', |
There was a problem hiding this comment.
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
lib.ts
- everything should be imported from there, when app is used as packageThere are still unused exports and files, I didn't delete everything
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
😟 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