Skip to content

Commit 498373b

Browse files
committed
fix the eslint updated rules
1 parent feb07e8 commit 498373b

File tree

10 files changed

+53
-45
lines changed

10 files changed

+53
-45
lines changed

frontend/.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
4848
// breaks builds as we still have those warns
4949
"react-hooks/exhaustive-deps": "off", // Checks effect dependencies
50+
"jsx-a11y/control-has-associated-label": "off",
5051
"import/no-extraneous-dependencies": [
5152
"error",
5253
{

frontend/src/components/KsqlDb/Query/QueryForm/QueryForm.styled.ts

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -42,34 +42,32 @@ export const ButtonsContainer = styled.div`
4242
`;
4343

4444
export const SQLEditor = styled(BaseSQLEditor)(
45-
({ readOnly, theme }) =>
46-
css`
47-
background: ${readOnly && theme.ksqlDb.query.editor.readonly.background};
48-
.ace-cursor {
49-
${readOnly && `background: ${theme.default.transparentColor} `}
50-
}
45+
({ readOnly, theme }) => css`
46+
background: ${readOnly && theme.ksqlDb.query.editor.readonly.background};
47+
.ace-cursor {
48+
${readOnly && `background: ${theme.default.transparentColor} `}
49+
}
5150
52-
.ace_content {
53-
background-color: ${theme.default.backgroundColor};
54-
color: ${theme.default.color.normal};
55-
}
56-
.ace_line {
57-
background-color: ${theme.ksqlDb.query.editor.activeLine
58-
.backgroundColor};
59-
}
60-
.ace_gutter-cell {
61-
background-color: ${theme.ksqlDb.query.editor.cell.backgroundColor};
62-
}
63-
.ace_gutter-layer {
64-
background-color: ${theme.ksqlDb.query.editor.layer.backgroundColor};
65-
color: ${theme.default.color.normal};
66-
}
67-
.ace_cursor {
68-
color: ${theme.ksqlDb.query.editor.cursor};
69-
}
51+
.ace_content {
52+
background-color: ${theme.default.backgroundColor};
53+
color: ${theme.default.color.normal};
54+
}
55+
.ace_line {
56+
background-color: ${theme.ksqlDb.query.editor.activeLine.backgroundColor};
57+
}
58+
.ace_gutter-cell {
59+
background-color: ${theme.ksqlDb.query.editor.cell.backgroundColor};
60+
}
61+
.ace_gutter-layer {
62+
background-color: ${theme.ksqlDb.query.editor.layer.backgroundColor};
63+
color: ${theme.default.color.normal};
64+
}
65+
.ace_cursor {
66+
color: ${theme.ksqlDb.query.editor.cursor};
67+
}
7068
71-
.ace_print-margin {
72-
display: none;
73-
}
74-
`
69+
.ace_print-margin {
70+
display: none;
71+
}
72+
`
7573
);

frontend/src/components/NavBar/NavBar.styled.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ export const Span = styled.span(
111111
left: calc(50% - 8px);
112112
transform-origin: center;
113113
transition-duration: 86ms;
114-
transition-property: background-color, opacity, transform, -webkit-transform;
114+
transition-property:
115+
background-color,
116+
opacity,
117+
transform,
118+
-webkit-transform;
115119
transition-timing-function: ease-out;
116120
width: 16px;
117121

frontend/src/components/PageContainer/PageContainer.styled.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ export const Sidebar = styled.div<{ $visible: boolean }>(
2727
bottom: 0;
2828
padding: 8px 16px;
2929
overflow-y: scroll;
30-
transition: width 0.25s, opacity 0.25s, transform 0.25s,
30+
transition:
31+
width 0.25s,
32+
opacity 0.25s,
33+
transform 0.25s,
3134
-webkit-transform 0.25s;
3235
background: ${theme.menu.backgroundColor.normal};
3336
@media screen and (max-width: 1023px) {

frontend/src/components/Topics/Topic/Edit/topicParamsTransformer.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ const topicParamsTransformer = (topic?: Topic, config?: TopicConfig[]) => {
1919
return TOPIC_EDIT_FORM_DEFAULT_PROPS;
2020
}
2121

22-
const customParams = config.reduce((acc, { name, value, defaultValue }) => {
23-
if (value === defaultValue) return acc;
24-
if (!TOPIC_CUSTOM_PARAMS[name]) return acc;
25-
return [...acc, { name, value }];
26-
}, [] as { name: string; value?: string }[]);
22+
const customParams = config.reduce(
23+
(acc, { name, value, defaultValue }) => {
24+
if (value === defaultValue) return acc;
25+
if (!TOPIC_CUSTOM_PARAMS[name]) return acc;
26+
return [...acc, { name, value }];
27+
},
28+
[] as { name: string; value?: string }[]
29+
);
2730

2831
return {
2932
...TOPIC_EDIT_FORM_DEFAULT_PROPS,

frontend/src/components/Topics/Topic/Messages/Filters/__tests__/AddEditFilterContainer.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ describe('AddEditFilterContainer component', () => {
108108
const textAreaElement = inputs[0] as HTMLTextAreaElement;
109109
const inputNameElement = inputs[1];
110110
expect(inputNameElement).toHaveValue(mockData.id);
111-
expect(textAreaElement.value).toEqual('');
111+
expect(textAreaElement).toHaveValue('');
112112
});
113113

114114
it('should display the checkbox is not shown during the edit mode', async () => {

frontend/src/components/Topics/Topic/Messages/__test__/Message.spec.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ const contentTest =
1616
'{"payload":{"author":"DwaywelayTOP","archived":false,"name":"t3_11jshwd","id":"11jshwd"}}';
1717
jest.mock(
1818
'components/Topics/Topic/Messages/MessageContent/MessageContent',
19-
() => () =>
20-
(
21-
<tr>
22-
<td>{messageContentText}</td>
23-
</tr>
24-
)
19+
() => () => (
20+
<tr>
21+
<td>{messageContentText}</td>
22+
</tr>
23+
)
2524
);
2625

2726
describe('Message component', () => {

frontend/src/lib/hooks/useAppParams.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Params, useParams } from 'react-router-dom';
22
import { ClusterNameRoute } from 'lib/paths';
33

44
export default function useAppParams<
5-
T extends { [K in keyof Params]?: string }
5+
T extends { [K in keyof Params]?: string },
66
>() {
77
const params = useParams<T>() as T;
88

frontend/src/lib/hooks/useMessageFiltersStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { LOCAL_STORAGE_KEY_PREFIX } from 'lib/constants';
2-
import create from 'zustand';
2+
import { create } from 'zustand';
33
import { persist } from 'zustand/middleware';
44

55
export type AdvancedFiltersType = Record<string, AdvancedFilter>;

frontend/src/lib/yupExtended.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ declare module 'yup' {
77
TType extends yup.Maybe<string> = string | undefined,
88
TContext = yup.AnyObject,
99
TDefault = undefined,
10-
TFlags extends yup.Flags = ''
10+
TFlags extends yup.Flags = '',
1111
> extends yup.Schema<TType, TContext, TDefault, TFlags> {
1212
isJsonObject(message?: string): StringSchema<TType, TContext>;
1313
}

0 commit comments

Comments
 (0)