Skip to content

Commit 7e4ed34

Browse files
committed
Merge branch 'eslint-camelcase' of Arnei/opencast-admin-interface into develop
Pull request #1345 Activate eslint camelcase
2 parents 7906a41 + adfe53f commit 7e4ed34

20 files changed

Lines changed: 200 additions & 131 deletions

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export default [
1111
{
1212
rules: {
1313
// TODO: We want to turn these on eventually
14-
"camelcase": "off",
1514
"indent": "off",
1615
"max-len": "off",
1716
"no-tabs": "off",

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@reduxjs/toolkit": "^2.8.2",
1313
"array-move": "^4.0.0",
1414
"axios": "^1.10.0",
15+
"camelcase-keys": "^9.1.3",
1516
"classnames": "^2.5.1",
1617
"date-fns": "^4.1.0",
1718
"dompurify": "^3.2.6",

src/components/events/partials/ModalTabsAndPages/EventDetailsAssetMediaDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const EventDetailsAssetMediaDetails = () => {
2121
const media = useAppSelector(state => getAssetMediaDetails(state));
2222
const isFetching = useAppSelector(state => isFetchingAssetMediaDetails(state));
2323

24-
const PlayerType = media.has_video ? "video" : "audio";
24+
const PlayerType = media.hasVideo ? "video" : "audio";
2525

2626
const videoRef = useRef<HTMLVideoElement>(null);
2727

@@ -360,7 +360,7 @@ const EventDetailsAssetMediaDetails = () => {
360360
</div>
361361

362362
{/* preview video/audio player (only if we actually have video/audio) */}
363-
{(media.has_video || media.has_audio) && (
363+
{(media.hasVideo || media.hasAudio) && (
364364
<div className="obj tbl-container media-stream-details">
365365
<header>
366366
{t("EVENTS.EVENTS.DETAILS.ASSETS.PREVIEW") /* Preview */}

src/components/events/partials/ModalTabsAndPages/EventDetailsAssetsAddAsset.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import EventDetailsTabHierarchyNavigation from "./EventDetailsTabHierarchyNavigation";
33
import Notifications from "../../../shared/Notifications";
4-
import { style_button_spacing } from "../../../../utils/eventDetailsUtils";
4+
import { styleButtonSpacing } from "../../../../utils/eventDetailsUtils";
55
import { Formik, FormikProps } from "formik";
66
import { translateOverrideFallback } from "../../../../utils/utils";
77
import { useAppDispatch, useAppSelector } from "../../../../store";
@@ -134,7 +134,7 @@ const EventDetailsAssetsAddAsset = ({
134134
<footer>
135135
<button
136136
className="submit"
137-
style={style_button_spacing}
137+
style={styleButtonSpacing}
138138
type="submit"
139139
onClick={() => formik.handleSubmit()}
140140
>

src/components/events/partials/ModalTabsAndPages/EventDetailsTabHierarchyNavigation.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useTranslation } from "react-i18next";
22
import {
3-
style_nav,
4-
style_nav_hierarchy,
5-
style_nav_hierarchy_inactive,
3+
styleNav,
4+
styleNavHierarchy,
5+
styleNavHierarchyInactive,
66
} from "../../../../utils/eventDetailsUtils";
77
import ButtonLikeAnchor from "../../../shared/ButtonLikeAnchor";
88
import { ParseKeys } from "i18next";
@@ -33,41 +33,41 @@ const EventDetailsTabHierarchyNavigation = <T, >({
3333

3434
/* Hierarchy navigation */
3535
return (
36-
<nav className="scope" style={style_nav}>
36+
<nav className="scope" style={styleNav}>
3737
<ButtonLikeAnchor
3838
extraClassName="breadcrumb-link scope"
3939
style={
4040
hierarchyDepth === 0
41-
? style_nav_hierarchy
42-
: style_nav_hierarchy_inactive
41+
? styleNavHierarchy
42+
: styleNavHierarchyInactive
4343
}
4444
onClick={() => openSubTab(subTabArgument0)}
4545
>
4646
{t(translationKey0)}
4747
{hierarchyDepth > 0 && (
48-
<span style={style_nav_hierarchy_inactive}> </span>
48+
<span style={styleNavHierarchyInactive}> </span>
4949
)}
5050
</ButtonLikeAnchor>
5151
{hierarchyDepth > 0 && subTabArgument1 && (
5252
<ButtonLikeAnchor
5353
extraClassName="breadcrumb-link scope"
5454
style={
5555
hierarchyDepth === 1
56-
? style_nav_hierarchy
57-
: style_nav_hierarchy_inactive
56+
? styleNavHierarchy
57+
: styleNavHierarchyInactive
5858
}
5959
onClick={() => openSubTab(subTabArgument1)}
6060
>
6161
{translationKey1 && t(translationKey1)}
6262
{hierarchyDepth > 1 && (
63-
<span style={style_nav_hierarchy_inactive}> </span>
63+
<span style={styleNavHierarchyInactive}> </span>
6464
)}
6565
</ButtonLikeAnchor>
6666
)}
6767
{hierarchyDepth > 1 && subTabArgument2 && (
6868
<ButtonLikeAnchor
6969
extraClassName="breadcrumb-link scope"
70-
style={style_nav_hierarchy}
70+
style={styleNavHierarchy}
7171
onClick={() => openSubTab(subTabArgument2)}
7272
>
7373
{translationKey2 && t(translationKey2)}

src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowErrorDetails.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
getWorkflowErrorDetails,
44
isFetchingWorkflowErrorDetails,
55
} from "../../../../selectors/eventDetailsSelectors";
6-
import { error_detail_style } from "../../../../utils/eventDetailsUtils";
6+
import { errorDetailStyle } from "../../../../utils/eventDetailsUtils";
77
import EventDetailsTabHierarchyNavigation from "./EventDetailsTabHierarchyNavigation";
88
import { useAppDispatch, useAppSelector } from "../../../../store";
99
import { removeNotificationWizardForm } from "../../../../slices/notificationSlice";
@@ -98,7 +98,7 @@ const EventDetailsWorkflowErrorDetails = () => {
9898
) /* Job ID */
9999
}
100100
</td>
101-
<td>{errorDetails.job_id}</td>
101+
<td>{errorDetails.jobId}</td>
102102
</tr>
103103
<tr>
104104
<td>
@@ -122,7 +122,7 @@ const EventDetailsWorkflowErrorDetails = () => {
122122
) /* Host */
123123
}
124124
</td>
125-
<td>{errorDetails.processing_host}</td>
125+
<td>{errorDetails.processingHost}</td>
126126
</tr>
127127
<tr>
128128
<td>
@@ -132,7 +132,7 @@ const EventDetailsWorkflowErrorDetails = () => {
132132
) /* Type */
133133
}
134134
</td>
135-
<td>{errorDetails.service_type}</td>
135+
<td>{errorDetails.serviceType}</td>
136136
</tr>
137137
<tr>
138138
<td>
@@ -148,7 +148,7 @@ const EventDetailsWorkflowErrorDetails = () => {
148148
{errorDetails.details.map((item, key) => (
149149
<div key={key}>
150150
<h3>{item.name}</h3>
151-
<div style={error_detail_style}>
151+
<div style={errorDetailStyle}>
152152
<pre>{item.value}</pre>
153153
</div>
154154
</div>

src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowOperationDetails.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const EventDetailsWorkflowOperationDetails = () => {
9696
) /* Execution Host */
9797
}
9898
</td>
99-
<td>{operationDetails.execution_host}</td>
99+
<td>{operationDetails.executionHost}</td>
100100
</tr>
101101
<tr>
102102
<td>
@@ -116,7 +116,7 @@ const EventDetailsWorkflowOperationDetails = () => {
116116
) /* Time in Queue */
117117
}
118118
</td>
119-
<td>{operationDetails.time_in_queue}ms</td>
119+
<td>{operationDetails.timeInQueue}ms</td>
120120
</tr>
121121
<tr>
122122
<td>
@@ -154,7 +154,7 @@ const EventDetailsWorkflowOperationDetails = () => {
154154
) /* Retry Strategy */
155155
}
156156
</td>
157-
<td>{operationDetails.retry_strategy}</td>
157+
<td>{operationDetails.retryStrategy}</td>
158158
</tr>
159159
<tr>
160160
<td>
@@ -164,7 +164,7 @@ const EventDetailsWorkflowOperationDetails = () => {
164164
) /* Failed Attempts */
165165
}
166166
</td>
167-
<td>{operationDetails.failed_attempts}</td>
167+
<td>{operationDetails.failedAttempts}</td>
168168
</tr>
169169
<tr>
170170
<td>
@@ -174,7 +174,7 @@ const EventDetailsWorkflowOperationDetails = () => {
174174
) /* Max */
175175
}
176176
</td>
177-
<td>{operationDetails.max_attempts}</td>
177+
<td>{operationDetails.maxAttempts}</td>
178178
</tr>
179179
<tr>
180180
<td>
@@ -184,7 +184,7 @@ const EventDetailsWorkflowOperationDetails = () => {
184184
) /* Exception Handler Workflow */
185185
}
186186
</td>
187-
<td>{operationDetails.exception_handler_workflow}</td>
187+
<td>{operationDetails.exceptionHandlerWorkflow}</td>
188188
</tr>
189189
<tr>
190190
<td>
@@ -194,7 +194,7 @@ const EventDetailsWorkflowOperationDetails = () => {
194194
) /* Fail on Error */
195195
}
196196
</td>
197-
<td>{operationDetails.fail_on_error}</td>
197+
<td>{operationDetails.failOnError}</td>
198198
</tr>
199199
</tbody>
200200
)}

src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const NewAccessPage = <T extends RequiredFormProps>({
111111
descriptionText={"EVENTS.SERIES.NEW.ACCESS.ACCESS_POLICY.DESCRIPTION"}
112112
buttonText={"EVENTS.SERIES.NEW.ACCESS.ACCESS_POLICY.LABEL"}
113113
emptyText={"EVENTS.SERIES.NEW.ACCESS.ACCESS_POLICY.EMPTY"}
114-
transactions={{ read_only: false }}
114+
transactions={{ readOnly: false }}
115115
aclTemplates={aclTemplates}
116116
defaultUser={user}
117117
/>
@@ -128,7 +128,7 @@ const NewAccessPage = <T extends RequiredFormProps>({
128128
createLabel={"EVENTS.EVENTS.DETAILS.ACCESS.ACCESS_POLICY.NEW_USER"}
129129
formik={formik}
130130
hasActions={aclActions.length > 0}
131-
transactions={{ read_only: false }}
131+
transactions={{ readOnly: false }}
132132
aclActions={aclActions}
133133
roles={roles}
134134
editAccessRole={editAccessRole}
@@ -145,7 +145,7 @@ const NewAccessPage = <T extends RequiredFormProps>({
145145
createLabel={"EVENTS.EVENTS.DETAILS.ACCESS.ACCESS_POLICY.NEW"}
146146
formik={formik}
147147
hasActions={aclActions.length > 0}
148-
transactions={{ read_only: false }}
148+
transactions={{ readOnly: false }}
149149
aclActions={aclActions}
150150
roles={roles}
151151
editAccessRole={editAccessRole}
@@ -164,7 +164,7 @@ const NewAccessPage = <T extends RequiredFormProps>({
164164
createLabel={"EVENTS.EVENTS.DETAILS.ACCESS.ACCESS_POLICY.NEW"}
165165
formik={formik}
166166
hasActions={aclActions.length > 0}
167-
transactions={{ read_only: false }}
167+
transactions={{ readOnly: false }}
168168
aclActions={aclActions}
169169
roles={roles}
170170
editAccessRole={editAccessRole}

src/components/events/partials/wizards/RenderWorkflowConfig.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const RenderWorkflowConfig = <T extends RequiredFormProps>({
2929
const workflowDef = useAppSelector(state => getWorkflowDefById(state, workflowId));
3030

3131
// Get html for configuration panel
32-
const configPanel = !!workflowDef && workflowDef.configuration_panel_json
33-
? workflowDef.configuration_panel_json
32+
const configPanel = !!workflowDef && workflowDef.configurationPanelJson
33+
? workflowDef.configurationPanelJson
3434
: [];
3535
const description = !!workflowDef && workflowDef.description
3636
? workflowDef.description

0 commit comments

Comments
 (0)