File tree Expand file tree Collapse file tree 10 files changed +16
-17
lines changed
command-pallette/CommandPalletteUI/handlers
Clusters/views/ClusterOverview/ClusterValidation
Preferences/ResourceValidation
resources/ServiceAccounts/TokenRequestModal Expand file tree Collapse file tree 10 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export default defineConfig(
5656 '@typescript-eslint/no-non-null-asserted-optional-chain' : 'warn' ,
5757 '@typescript-eslint/no-unsafe-function-type' : 'warn' ,
5858 '@typescript-eslint/no-unused-expressions' : 'warn' ,
59- '@typescript-eslint/ban-ts-comment' : 'warn ' ,
59+ '@typescript-eslint/ban-ts-comment' : 'error ' ,
6060 '@typescript-eslint/no-require-imports' : 'warn' ,
6161 // Misc
6262 'no-unused-vars' : [
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ function sendNamespaceSwitchMessage(
136136 ) ;
137137 if ( ! matchedRoute ) return ;
138138
139- // @ts -ignore
139+ //@ts -expect-error Property is accessible
140140 const resourceType = matchedRoute . params . resourceType || '' ;
141141
142142 navigate (
@@ -338,7 +338,7 @@ function createResults(context: CommandPaletteContext): Result[] {
338338 let resources = resourceCache [ resourceType ] ;
339339
340340 if ( typeof resources !== 'object' ) {
341- //@ts -ignore TODO: handle typein Result
341+ //@ts -expect-error TODO: handle type in Result
342342 return [ linkToList , { type : LOADING_INDICATOR } ] ;
343343 }
344344 if ( resourceType === 'namespaces' && ! showHiddenNamespaces ) {
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ function createResults(context: CommandPaletteContext): Result[] {
104104
105105 const crds = resourceCache [ 'customresourcedefinitions' ] ;
106106 if ( typeof crds !== 'object' ) {
107- //@ts -ignore TODO: handle typein Result
107+ //@ts -expect-error TODO: handle typein Result
108108 return [ linkToList , { type : LOADING_INDICATOR } ] ;
109109 }
110110
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ function createResults(context: CommandPaletteContext): Result[] | null {
119119 } ;
120120
121121 if ( typeof helmReleases !== 'object' ) {
122- //@ts -ignore todo: how to handle 'type' in Result[]?
122+ //@ts -expect-error Todo: handle 'type' in Result[]
123123 return [ linkToList , { type : LOADING_INDICATOR } ] ;
124124 }
125125
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ function createResults(context: CommandPaletteContext): Result[] {
108108 const { resourceCache, tokens, namespace } = context ;
109109 const pods = resourceCache [ `${ namespace } /pods` ] as Pod [ ] ;
110110 if ( typeof pods !== 'object' ) {
111- //@ts -ignore TODO: handle typein Result
111+ //@ts -expect-error TODO: handle type in Result
112112 return [ { type : LOADING_INDICATOR } ] ;
113113 }
114114
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export default function App() {
149149 manualKubeConfigId . formOpen &&
150150 createPortal (
151151 < Dialog open = { true } >
152- { /*@ts -ignore */ }
152+ { /*@ts -expect-error Type mismatch between js and ts */ }
153153 < ResourceForm . Single
154154 formElementRef = { authFormRef }
155155 createResource = { updateManualKubeConfigIdState }
@@ -164,7 +164,7 @@ export default function App() {
164164 { t ( 'clusters.add.title' ) }
165165 </ Button >
166166 </ div >
167- { /*@ts -ignore */ }
167+ { /*@ts -expect-error Type mismatch between js and ts */ }
168168 </ ResourceForm . Single >
169169 </ Dialog > ,
170170 document . body ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const executeInWorker = (...args: any[]) =>
1919 } ,
2020 { once : true } ,
2121 ) ;
22- // @ts -ignore
22+ // @ts -expect-error args are of type any[], no easy fix
2323 worker . postMessage ( ...args ) ;
2424 } ) ;
2525 } ) ;
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ export const AddSourceYamls = () => {
283283 return (
284284 < OptionCustom
285285 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
286- // @ts -ignore
286+ // @ts -expect-error
287287 disabled
288288 value = { ns }
289289 key = { ns }
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ export default function ResourceValidationSettings() {
123123 title = { t (
124124 'settings.clusters.resourcesValidation.enabled-policies' ,
125125 ) }
126- //@ts -ignore
126+ //@ts -expect-error Type mismatch between js and ts
127127 entries = {
128128 choosePolicies
129129 ? policyList
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const ComboboxInputWithSeconds = ({
3939 generateTokenRequest : ( ) => void ;
4040} ) => {
4141 return (
42- //@ts -ignore
42+ //@ts -expect-error Mismatch between js and ts
4343 < ComboboxInput
4444 id = "event-version-combobox"
4545 required
@@ -121,12 +121,12 @@ export function TokenRequestModal({
121121 />
122122 }
123123 >
124- { /*@ts -ignore */ }
124+ { /*@ts -expect-error Type mismatch between js and ts */ }
125125 < ResourceForm . Single
126126 resource = { tokenRequest }
127127 setResource = { setTokenRequest }
128128 >
129- { /*@ts -ignore */ }
129+ { /*@ts -expect-error Type mismatch between js and ts */ }
130130 < ResourceForm . FormField
131131 required
132132 propertyPath = "$.spec.expirationSeconds"
@@ -155,7 +155,6 @@ export function TokenRequestModal({
155155 justifyContent : 'flex-end' ,
156156 } }
157157 >
158- { /*@ts -ignore*/ }
159158 < CopiableText
160159 iconOnly
161160 buttonText = { t ( 'common.buttons.copy' ) }
@@ -172,7 +171,7 @@ export function TokenRequestModal({
172171 { t ( 'service-accounts.headers.download-kubeconfig' ) }
173172 </ Button >
174173 </ div >
175- { /*@ts -ignore */ }
174+ { /*@ts -expect-error Type mismatch between js and ts */ }
176175 < Editor
177176 value = { kubeconfigYaml }
178177 updateValueOnParentChange
@@ -182,7 +181,7 @@ export function TokenRequestModal({
182181 language = "yaml"
183182 />
184183 </ div >
185- { /*@ts -ignore */ }
184+ { /*@ts -expect-error Type mismatch between js and ts */ }
186185 </ ResourceForm . Single >
187186 </ Dialog >
188187 ) ;
You can’t perform that action at this time.
0 commit comments