Skip to content

Commit e2b63fc

Browse files
Bump eslint-config-airbnb-typescript from 12.3.1 to 14.0.2 in /kafka-ui-react-app (#1294)
* Bump eslint-config-airbnb-typescript in /kafka-ui-react-app Bumps [eslint-config-airbnb-typescript](https://github.com/iamturns/eslint-config-airbnb-typescript) from 12.3.1 to 14.0.2. - [Release notes](https://github.com/iamturns/eslint-config-airbnb-typescript/releases) - [Changelog](https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/CHANGELOG.md) - [Commits](iamturns/eslint-config-airbnb-typescript@v12.3.1...v14.0.2) --- updated-dependencies: - dependency-name: eslint-config-airbnb-typescript dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Update Eslint config * Update eslint Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Oleg Shuralev <[email protected]>
1 parent f85a340 commit e2b63fc

File tree

14 files changed

+535
-490
lines changed

14 files changed

+535
-490
lines changed

kafka-ui-react-app/.eslintrc.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"prettier"
2626
],
2727
"extends": [
28+
"airbnb",
2829
"airbnb-typescript",
2930
"plugin:@typescript-eslint/recommended",
3031
"plugin:jest-dom/recommended",
@@ -70,7 +71,15 @@
7071
"state"
7172
]
7273
}
73-
]
74+
],
75+
"react/function-component-definition": [
76+
2,
77+
{
78+
"namedComponents": "arrow-function",
79+
"unnamedComponents": "arrow-function"
80+
}
81+
],
82+
"react/jsx-no-constructed-context-values": "off"
7483
},
7584
"overrides": [
7685
{
@@ -90,4 +99,4 @@
9099
}
91100
}
92101
]
93-
}
102+
}

kafka-ui-react-app/package-lock.json

Lines changed: 460 additions & 424 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kafka-ui-react-app/package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"@rooks/use-outside-click-ref": "^4.10.1",
1212
"@testing-library/react": "^12.0.0",
1313
"@types/eventsource": "^1.1.6",
14-
"@types/styled-components": "^5.1.14",
1514
"@types/yup": "^0.29.13",
1615
"ace-builds": "^1.4.12",
1716
"ajv": "^8.6.3",
@@ -99,22 +98,22 @@
9998
"@types/redux-mock-store": "^1.0.3",
10099
"@types/styled-components": "^5.1.13",
101100
"@types/uuid": "^8.3.1",
102-
"@typescript-eslint/eslint-plugin": "^4.29.1",
103-
"@typescript-eslint/parser": "^4.29.1",
101+
"@typescript-eslint/eslint-plugin": "^5.10.0",
102+
"@typescript-eslint/parser": "^5.10.0",
104103
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.3",
105104
"dotenv": "^10.0.0",
106105
"enzyme": "^3.11.0",
107106
"enzyme-to-json": "^3.6.1",
108-
"eslint": "^7.32.0",
109-
"eslint-config-airbnb": "^18.2.1",
110-
"eslint-config-airbnb-typescript": "^12.3.1",
107+
"eslint": "^8.7.0",
108+
"eslint-config-airbnb": "^19.0.0",
109+
"eslint-config-airbnb-typescript": "^16.1.0",
111110
"eslint-config-prettier": "^8.3.0",
112-
"eslint-plugin-import": "^2.24.0",
113-
"eslint-plugin-jest-dom": "^3.9.2",
114-
"eslint-plugin-jsx-a11y": "^6.4.1",
111+
"eslint-plugin-import": "^2.25.4",
112+
"eslint-plugin-jest-dom": "^4.0.1",
113+
"eslint-plugin-jsx-a11y": "^6.5.1",
115114
"eslint-plugin-prettier": "^4.0.0",
116115
"eslint-plugin-react": "^7.28.0",
117-
"eslint-plugin-react-hooks": "^4.2.0",
116+
"eslint-plugin-react-hooks": "^4.3.0",
118117
"esprint": "^3.1.0",
119118
"fetch-mock-jest": "^1.5.1",
120119
"history": "^5.0.0",

kafka-ui-react-app/src/components/Dashboard/ClustersWidget/__test__/fixtures.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export const onlineCluster: Cluster = {
77
brokerCount: 1,
88
onlinePartitionCount: 6,
99
topicCount: 3,
10-
bytesInPerSec: 0.000030618196853764715,
11-
bytesOutPerSec: 5.737800890036267075817,
10+
bytesInPerSec: 0.00003061819685376471,
11+
bytesOutPerSec: 5.737800890036267,
1212
readOnly: false,
1313
};
1414

@@ -19,8 +19,8 @@ export const offlineCluster: Cluster = {
1919
brokerCount: 1,
2020
onlinePartitionCount: 2,
2121
topicCount: 2,
22-
bytesInPerSec: 8000.0000067376808542600021,
23-
bytesOutPerSec: 0.8153063567297119490871,
22+
bytesInPerSec: 8000.00000673768,
23+
bytesOutPerSec: 0.8153063567297119,
2424
readOnly: true,
2525
};
2626

kafka-ui-react-app/src/components/Topics/List/ListItem.tsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,20 @@ const ListItem: React.FC<ListItemProps> = ({
112112
</td>
113113
<td className="topic-action-block" style={{ width: '4%' }}>
114114
{!internal && !isReadOnly && vElipsisVisble ? (
115-
<>
116-
<div className="has-text-right">
117-
<Dropdown label={<VerticalElipsisIcon />} right>
118-
<DropdownItem onClick={clearTopicMessagesHandler}>
119-
<span className="has-text-danger">Clear Messages</span>
115+
<div className="has-text-right">
116+
<Dropdown label={<VerticalElipsisIcon />} right>
117+
<DropdownItem onClick={clearTopicMessagesHandler}>
118+
<span className="has-text-danger">Clear Messages</span>
119+
</DropdownItem>
120+
{isTopicDeletionAllowed && (
121+
<DropdownItem
122+
onClick={() => setDeleteTopicConfirmationVisible(true)}
123+
>
124+
<span className="has-text-danger">Remove Topic</span>
120125
</DropdownItem>
121-
{isTopicDeletionAllowed && (
122-
<DropdownItem
123-
onClick={() => setDeleteTopicConfirmationVisible(true)}
124-
>
125-
<span className="has-text-danger">Remove Topic</span>
126-
</DropdownItem>
127-
)}
128-
</Dropdown>
129-
</div>
130-
</>
126+
)}
127+
</Dropdown>
128+
</div>
131129
) : null}
132130
<ConfirmationModal
133131
isOpen={isDeleteTopicConfirmationVisible}

kafka-ui-react-app/src/components/Topics/shared/Form/CustomParams/CustomParamField.tsx

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,39 +58,36 @@ const CustomParamField: React.FC<Props> = ({
5858

5959
return (
6060
<C.Column>
61-
<>
62-
<div>
63-
<InputLabel>Custom Parameter</InputLabel>
64-
<Controller
65-
control={control}
66-
rules={{ required: 'Custom Parameter is required.' }}
67-
name={`customParams.${index}.name`}
68-
render={({ field: { name, onChange } }) => (
69-
<Select
70-
name={name}
71-
placeholder="Select"
72-
disabled={isDisabled}
73-
minWidth="270px"
74-
onChange={onChange}
75-
options={Object.keys(TOPIC_CUSTOM_PARAMS)
76-
.sort()
77-
.map((opt) => ({
78-
value: opt,
79-
label: opt,
80-
disabled: existingFields.includes(opt),
81-
}))}
82-
/>
83-
)}
84-
/>
85-
<FormError>
86-
<ErrorMessage
87-
errors={errors}
88-
name={`customParams.${index}.name` as const}
61+
<div>
62+
<InputLabel>Custom Parameter</InputLabel>
63+
<Controller
64+
control={control}
65+
rules={{ required: 'Custom Parameter is required.' }}
66+
name={`customParams.${index}.name`}
67+
render={({ field: { name, onChange } }) => (
68+
<Select
69+
name={name}
70+
placeholder="Select"
71+
disabled={isDisabled}
72+
minWidth="270px"
73+
onChange={onChange}
74+
options={Object.keys(TOPIC_CUSTOM_PARAMS)
75+
.sort()
76+
.map((opt) => ({
77+
value: opt,
78+
label: opt,
79+
disabled: existingFields.includes(opt),
80+
}))}
8981
/>
90-
</FormError>
91-
</div>
92-
</>
93-
82+
)}
83+
/>
84+
<FormError>
85+
<ErrorMessage
86+
errors={errors}
87+
name={`customParams.${index}.name` as const}
88+
/>
89+
</FormError>
90+
</div>
9491
<div>
9592
<InputLabel>Value</InputLabel>
9693
<Input

kafka-ui-react-app/src/components/common/Breadcrumb/Breadcrumb.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const Breadcrumb: React.FC<Props> = () => {
4646
);
4747

4848
if (links.length < 2) {
49-
return <></>;
49+
return null;
5050
}
5151
return (
5252
<BreadcrumbWrapper role="list">

kafka-ui-react-app/src/lib/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export const BASE_PARAMS: ConfigurationParameters = {
1414
},
1515
};
1616

17-
export const TOPIC_NAME_VALIDATION_PATTERN = RegExp(/^[.,A-Za-z0-9_-]+$/);
18-
export const SCHEMA_NAME_VALIDATION_PATTERN = RegExp(/^[.,A-Za-z0-9_-]+$/);
17+
export const TOPIC_NAME_VALIDATION_PATTERN = /^[.,A-Za-z0-9_-]+$/;
18+
export const SCHEMA_NAME_VALIDATION_PATTERN = /^[.,A-Za-z0-9_-]+$/;
1919

2020
export const TOPIC_CUSTOM_PARAMS: Record<string, string> = {
2121
'compression.type': 'producer',

kafka-ui-react-app/src/redux/reducers/alerts/reducer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { addError, removeAlert } from './utils';
66

77
export const initialState: AlertsState = {};
88

9+
// eslint-disable-next-line @typescript-eslint/default-param-last
910
const reducer = (state = initialState, action: Action): AlertsState => {
1011
const { type } = action;
1112

kafka-ui-react-app/src/redux/reducers/connect/reducer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const initialState: ConnectState = {
1515
search: '',
1616
};
1717

18+
// eslint-disable-next-line @typescript-eslint/default-param-last
1819
const reducer = (state = initialState, action: Action): ConnectState => {
1920
switch (action.type) {
2021
case getType(actions.fetchConnectsAction.success):

0 commit comments

Comments
 (0)