Skip to content

Commit 51f9415

Browse files
committed
fix: linter issues
1 parent 33555c3 commit 51f9415

File tree

12 files changed

+23
-29
lines changed

12 files changed

+23
-29
lines changed

.eslintrc

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
"root": true,
88
"overrides": [
99
{
10-
"files": [
11-
"config-overrides.js",
12-
"commitlint.config.js"
13-
],
10+
"files": ["*.js"],
11+
"rules": {
12+
"@typescript-eslint/consistent-type-imports": "off",
13+
},
14+
},
15+
{
16+
"files": ["config-overrides.js", "commitlint.config.js"],
1417
"env": {
1518
"node": true,
1619
},
@@ -20,20 +23,14 @@
2023
"project": "./tsconfig.json",
2124
},
2225
"rules": {
23-
"import/consistent-type-specifier-style": [
24-
"error",
25-
"prefer-top-level"
26-
],
26+
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
2727
"@typescript-eslint/consistent-type-imports": [
2828
"error",
2929
{
3030
"prefer": "type-imports",
31-
"fixStyle": "separate-type-imports"
31+
"fixStyle": "separate-type-imports",
3232
},
3333
],
34-
"curly": [
35-
"error",
36-
"all"
37-
],
34+
"curly": ["error", "all"],
3835
},
3936
}
File renamed without changes.

src/components/Stack/Stack.scss

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,12 @@
4444
.stack__layer + .stack__layer {
4545
transform: translate(
4646
calc(
47-
var(--ydb-stack-level) * (var(--ydb-stack-offset-x-hover) * 2) - var(
48-
--ydb-stack-offset-x-hover
49-
)
47+
var(--ydb-stack-level) *
48+
(var(--ydb-stack-offset-x-hover) * 2) - var(--ydb-stack-offset-x-hover)
5049
),
5150
calc(
52-
var(--ydb-stack-level) * (var(--ydb-stack-offset-y-hover) * 2) - var(
53-
--ydb-stack-offset-y-hover
54-
)
51+
var(--ydb-stack-level) *
52+
(var(--ydb-stack-offset-y-hover) * 2) - var(--ydb-stack-offset-y-hover)
5553
)
5654
);
5755
}

src/containers/AsideNavigation/AsideNavigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface YdbUserDropdownProps {
3232

3333
function UserDropdown({isCompact, popupAnchor, user, children}: YdbUserDropdownProps) {
3434
const [isUserDropdownVisible, setIsUserDropdownVisible] = React.useState(false);
35-
const iconData = user ? user.icon ?? Person : userSecret;
35+
const iconData = user ? (user.icon ?? Person) : userSecret;
3636
return (
3737
<FooterItem
3838
compact={isCompact}

src/store/reducers/query/prepareQueryData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function prepareQueryData(
6666
...result,
6767
preparedPlan: {...preparePlan(planWithStats), pristine: planWithStats},
6868
};
69-
} catch (e) {}
69+
} catch {}
7070
}
7171

7272
return result;

src/types/redux-location-state.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-duplicate-imports */
21
declare module 'redux-location-state' {
32
import type {Dispatch, Middleware, PayloadAction, Reducer, Store} from '@reduxjs/toolkit';
43
import type {History, Location} from 'history';

src/utils/hooks/useLastQueryExecutionSettings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const useLastQueryExecutionSettings = () => {
1212

1313
try {
1414
lastSettings = querySettingsValidationSchema.parse(lastStorageSettings);
15-
} catch (error) {
15+
} catch {
1616
lastSettings = undefined;
1717
}
1818

src/utils/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function parseJson(value?: string | null) {
44
}
55
try {
66
return JSON.parse(value);
7-
} catch (err) {
7+
} catch {
88
return value;
99
}
1010
}

tests/playwrightSetup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async function warmupApplication(appPage: PageModel) {
1313
await appPage.goto();
1414
await appPage.page.waitForLoadState('networkidle');
1515
await appPage.page.waitForTimeout(retryDelay);
16-
} catch (error) {
16+
} catch {
1717
if (i === maxRetries - 1) {
1818
throw new Error('Application warmup failed after max retries');
1919
}

tests/suites/tenant/queryEditor/queryTemplates.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test.describe('Query Templates', () => {
4343
try {
4444
await queryEditor.waitForStatus('Failed');
4545
// If we reach here, the test passed because execution failed as expected
46-
} catch (error) {
46+
} catch {
4747
throw new Error('Update table template should not have executed successfully');
4848
}
4949
});
@@ -75,7 +75,7 @@ test.describe('Query Templates', () => {
7575
// If not failed, verify it completed successfully
7676
expect(status).toBe('Completed');
7777
}
78-
} catch (error) {
78+
} catch {
7979
throw new Error(
8080
'Query execution neither completed successfully nor failed with expected error',
8181
);

0 commit comments

Comments
 (0)