Skip to content

Commit 8fa28e5

Browse files
committed
chore: lint CISelfDockerBuildOptions
1 parent e661e8d commit 8fa28e5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/components/ciConfig/CISelfDockerBuildOption.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
import React from 'react'
1+
// Disabling due to react select issue
2+
/* eslint-disable jsx-a11y/label-has-associated-control */
3+
import React, { FunctionComponent } from 'react'
24
import ReactSelect from 'react-select'
35
import Tippy from '@tippyjs/react'
46
import { CustomInput } from '@devtron-labs/devtron-fe-common-lib'
57
import { renderOptionIcon, repositoryControls, repositoryOption } from './CIBuildpackBuildOptions'
68
import { _multiSelectStyles } from './CIConfig.utils'
79
import { CISelfDockerBuildOptionProps } from './types'
810

9-
export default function CISelfDockerBuildOption({
11+
const CISelfDockerBuildOption: FunctionComponent<CISelfDockerBuildOptionProps> = ({
1012
readOnly,
1113
sourceMaterials,
1214
readonlyDockerfileRelativePath,
@@ -18,25 +20,23 @@ export default function CISelfDockerBuildOption({
1820
handleOnChangeConfig,
1921
handleFileLocationChange,
2022
dockerfileError,
21-
}: CISelfDockerBuildOptionProps) {
23+
}) => {
2224
if (readOnly) {
2325
return (
2426
<div className={`${configOverrideView ? 'mb-12' : ''} form-row__docker`}>
2527
<div className={`form__field ${configOverrideView ? 'mb-0-imp' : ''}`}>
26-
<label className="form__label">Repository containing Dockerfile</label>
28+
<span className="form__label">Repository containing Dockerfile</span>
2729

2830
<div className="flex left">
2931
{currentMaterial?.url && renderOptionIcon(currentMaterial.url)}
3032
<span className="fs-14 fw-4 lh-20 cn-9">{currentMaterial?.name || 'Not selected'}</span>
3133
</div>
3234

33-
{repositoryError && <label className="form__error">{repositoryError}</label>}
35+
{repositoryError && <span className="form__error">{repositoryError}</span>}
3436
</div>
3537

3638
<div className={`form__field ${configOverrideView ? 'mb-0-imp' : ''}`}>
37-
<label htmlFor="" className="form__label dc__required-field">
38-
Dockerfile Path (Relative)
39-
</label>
39+
<span className="form__label dc__required-field">Dockerfile Path (Relative)</span>
4040

4141
<span className="fs-14 fw-4 lh-20 cn-9">{readonlyDockerfileRelativePath}</span>
4242
</div>
@@ -52,7 +52,6 @@ export default function CISelfDockerBuildOption({
5252
<ReactSelect
5353
className="m-0"
5454
classNamePrefix="build-config__select-repository-containing-dockerfile"
55-
tabIndex={3}
5655
isMulti={false}
5756
isClearable={false}
5857
options={sourceMaterials}
@@ -96,7 +95,6 @@ export default function CISelfDockerBuildOption({
9695
</Tippy>
9796

9897
<CustomInput
99-
tabIndex={4}
10098
rootClassName="file-name"
10199
data-testid="dockerfile-path-text-box"
102100
placeholder="Dockerfile"
@@ -112,3 +110,5 @@ export default function CISelfDockerBuildOption({
112110
</div>
113111
)
114112
}
113+
114+
export default CISelfDockerBuildOption

0 commit comments

Comments
 (0)