Skip to content

Commit 23fb044

Browse files
committed
remove leftover "as any" casts from integration config forms
1 parent 3696f88 commit 23fb044

File tree

6 files changed

+68
-77
lines changed

6 files changed

+68
-77
lines changed

src/webviews/webview-side/integrations/AlloyDBForm.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,35 +97,35 @@ export const AlloyDBForm: React.FC<IAlloyDBFormProps> = ({
9797
return (
9898
<form onSubmit={handleSubmit}>
9999
<div className="form-group">
100-
<label htmlFor="name">{getLocString('integrationsAlloyDBNameLabel' as any, 'Name (optional)')}</label>
100+
<label htmlFor="name">{getLocString('integrationsAlloyDBNameLabel', 'Name (optional)')}</label>
101101
<input
102102
type="text"
103103
id="name"
104104
value={pendingConfig.name}
105105
onChange={handleNameChange}
106-
placeholder={getLocString('integrationsAlloyDBNamePlaceholder' as any, 'My AlloyDB Database')}
106+
placeholder={getLocString('integrationsAlloyDBNamePlaceholder', 'My AlloyDB Database')}
107107
autoComplete="off"
108108
/>
109109
</div>
110110

111111
<div className="form-group">
112112
<label htmlFor="host">
113-
{getLocString('integrationsAlloyDBHostLabel' as any, 'Host')}{' '}
113+
{getLocString('integrationsAlloyDBHostLabel', 'Host')}{' '}
114114
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
115115
</label>
116116
<input
117117
type="text"
118118
id="host"
119119
value={pendingConfig.metadata.host}
120120
onChange={handleHostChange}
121-
placeholder={getLocString('integrationsAlloyDBHostPlaceholder' as any, 'localhost')}
121+
placeholder={getLocString('integrationsAlloyDBHostPlaceholder', 'localhost')}
122122
autoComplete="off"
123123
required
124124
/>
125125
</div>
126126

127127
<div className="form-group">
128-
<label htmlFor="port">{getLocString('integrationsAlloyDBPortLabel' as any, 'Port')}</label>
128+
<label htmlFor="port">{getLocString('integrationsAlloyDBPortLabel', 'Port')}</label>
129129
<input
130130
type="text"
131131
id="port"
@@ -138,47 +138,47 @@ export const AlloyDBForm: React.FC<IAlloyDBFormProps> = ({
138138

139139
<div className="form-group">
140140
<label htmlFor="database">
141-
{getLocString('integrationsAlloyDBDatabaseLabel' as any, 'Database')}{' '}
141+
{getLocString('integrationsAlloyDBDatabaseLabel', 'Database')}{' '}
142142
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
143143
</label>
144144
<input
145145
type="text"
146146
id="database"
147147
value={pendingConfig.metadata.database}
148148
onChange={handleDatabaseChange}
149-
placeholder={getLocString('integrationsAlloyDBDatabasePlaceholder' as any, 'my_database')}
149+
placeholder={getLocString('integrationsAlloyDBDatabasePlaceholder', 'my_database')}
150150
autoComplete="off"
151151
required
152152
/>
153153
</div>
154154

155155
<div className="form-group">
156156
<label htmlFor="username">
157-
{getLocString('integrationsAlloyDBUsernameLabel' as any, 'Username')}{' '}
157+
{getLocString('integrationsAlloyDBUsernameLabel', 'Username')}{' '}
158158
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
159159
</label>
160160
<input
161161
type="text"
162162
id="username"
163163
value={pendingConfig.metadata.user}
164164
onChange={handleUsernameChange}
165-
placeholder={getLocString('integrationsAlloyDBUsernamePlaceholder' as any, 'username')}
165+
placeholder={getLocString('integrationsAlloyDBUsernamePlaceholder', 'username')}
166166
autoComplete="username"
167167
required
168168
/>
169169
</div>
170170

171171
<div className="form-group">
172172
<label htmlFor="password">
173-
{getLocString('integrationsAlloyDBPasswordLabel' as any, 'Password')}{' '}
173+
{getLocString('integrationsAlloyDBPasswordLabel', 'Password')}{' '}
174174
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
175175
</label>
176176
<input
177177
type="password"
178178
id="password"
179179
value={pendingConfig.metadata.password}
180180
onChange={handlePasswordChange}
181-
placeholder={getLocString('integrationsAlloyDBPasswordPlaceholder' as any, '••••••••')}
181+
placeholder={getLocString('integrationsAlloyDBPasswordPlaceholder', '••••••••')}
182182
autoComplete="current-password"
183183
required
184184
/>

src/webviews/webview-side/integrations/ClickHouseForm.tsx

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,37 +98,35 @@ export const ClickHouseForm: React.FC<IClickHouseFormProps> = ({
9898
return (
9999
<form onSubmit={handleSubmit}>
100100
<div className="form-group">
101-
<label htmlFor="name">
102-
{getLocString('integrationsClickHouseNameLabel' as any, 'Name (optional)')}
103-
</label>
101+
<label htmlFor="name">{getLocString('integrationsClickHouseNameLabel', 'Name (optional)')}</label>
104102
<input
105103
type="text"
106104
id="name"
107105
value={pendingConfig.name}
108106
onChange={handleNameChange}
109-
placeholder={getLocString('integrationsClickHouseNamePlaceholder' as any, 'My ClickHouse Database')}
107+
placeholder={getLocString('integrationsClickHouseNamePlaceholder', 'My ClickHouse Database')}
110108
autoComplete="off"
111109
/>
112110
</div>
113111

114112
<div className="form-group">
115113
<label htmlFor="host">
116-
{getLocString('integrationsClickHouseHostLabel' as any, 'Host')}{' '}
114+
{getLocString('integrationsClickHouseHostLabel', 'Host')}{' '}
117115
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
118116
</label>
119117
<input
120118
type="text"
121119
id="host"
122120
value={pendingConfig.metadata.host}
123121
onChange={handleHostChange}
124-
placeholder={getLocString('integrationsClickHouseHostPlaceholder' as any, 'localhost')}
122+
placeholder={getLocString('integrationsClickHouseHostPlaceholder', 'localhost')}
125123
autoComplete="off"
126124
required
127125
/>
128126
</div>
129127

130128
<div className="form-group">
131-
<label htmlFor="port">{getLocString('integrationsClickHousePortLabel' as any, 'Port')}</label>
129+
<label htmlFor="port">{getLocString('integrationsClickHousePortLabel', 'Port')}</label>
132130
<input
133131
type="text"
134132
id="port"
@@ -141,46 +139,44 @@ export const ClickHouseForm: React.FC<IClickHouseFormProps> = ({
141139

142140
<div className="form-group">
143141
<label htmlFor="database">
144-
{getLocString('integrationsClickHouseDatabaseLabel' as any, 'Database')}{' '}
142+
{getLocString('integrationsClickHouseDatabaseLabel', 'Database')}{' '}
145143
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
146144
</label>
147145
<input
148146
type="text"
149147
id="database"
150148
value={pendingConfig.metadata.database}
151149
onChange={handleDatabaseChange}
152-
placeholder={getLocString('integrationsClickHouseDatabasePlaceholder' as any, 'my_database')}
150+
placeholder={getLocString('integrationsClickHouseDatabasePlaceholder', 'my_database')}
153151
autoComplete="off"
154152
required
155153
/>
156154
</div>
157155

158156
<div className="form-group">
159157
<label htmlFor="username">
160-
{getLocString('integrationsClickHouseUsernameLabel' as any, 'Username')}{' '}
158+
{getLocString('integrationsClickHouseUsernameLabel', 'Username')}{' '}
161159
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
162160
</label>
163161
<input
164162
type="text"
165163
id="username"
166164
value={pendingConfig.metadata.user}
167165
onChange={handleUsernameChange}
168-
placeholder={getLocString('integrationsClickHouseUsernamePlaceholder' as any, 'username')}
166+
placeholder={getLocString('integrationsClickHouseUsernamePlaceholder', 'username')}
169167
autoComplete="username"
170168
required
171169
/>
172170
</div>
173171

174172
<div className="form-group">
175-
<label htmlFor="password">
176-
{getLocString('integrationsClickHousePasswordLabel' as any, 'Password')}
177-
</label>
173+
<label htmlFor="password">{getLocString('integrationsClickHousePasswordLabel', 'Password')}</label>
178174
<input
179175
type="password"
180176
id="password"
181177
value={pendingConfig.metadata.password || ''}
182178
onChange={handlePasswordChange}
183-
placeholder={getLocString('integrationsClickHousePasswordPlaceholder' as any, '••••••••')}
179+
placeholder={getLocString('integrationsClickHousePasswordPlaceholder', '••••••••')}
184180
autoComplete="current-password"
185181
/>
186182
</div>

src/webviews/webview-side/integrations/MaterializeForm.tsx

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,40 +107,35 @@ export const MaterializeForm: React.FC<IMaterializeFormProps> = ({
107107
return (
108108
<form onSubmit={handleSubmit}>
109109
<div className="form-group">
110-
<label htmlFor="name">
111-
{getLocString('integrationsMaterializeNameLabel' as any, 'Name (optional)')}
112-
</label>
110+
<label htmlFor="name">{getLocString('integrationsMaterializeNameLabel', 'Name (optional)')}</label>
113111
<input
114112
type="text"
115113
id="name"
116114
value={pendingConfig.name}
117115
onChange={handleNameChange}
118-
placeholder={getLocString(
119-
'integrationsMaterializeNamePlaceholder' as any,
120-
'My Materialize Database'
121-
)}
116+
placeholder={getLocString('integrationsMaterializeNamePlaceholder', 'My Materialize Database')}
122117
autoComplete="off"
123118
/>
124119
</div>
125120

126121
<div className="form-group">
127122
<label htmlFor="host">
128-
{getLocString('integrationsMaterializeHostLabel' as any, 'Host')}{' '}
123+
{getLocString('integrationsMaterializeHostLabel', 'Host')}{' '}
129124
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
130125
</label>
131126
<input
132127
type="text"
133128
id="host"
134129
value={pendingConfig.metadata.host}
135130
onChange={handleHostChange}
136-
placeholder={getLocString('integrationsMaterializeHostPlaceholder' as any, 'localhost')}
131+
placeholder={getLocString('integrationsMaterializeHostPlaceholder', 'localhost')}
137132
autoComplete="off"
138133
required
139134
/>
140135
</div>
141136

142137
<div className="form-group">
143-
<label htmlFor="port">{getLocString('integrationsMaterializePortLabel' as any, 'Port')}</label>
138+
<label htmlFor="port">{getLocString('integrationsMaterializePortLabel', 'Port')}</label>
144139
<input
145140
type="text"
146141
id="port"
@@ -153,63 +148,63 @@ export const MaterializeForm: React.FC<IMaterializeFormProps> = ({
153148

154149
<div className="form-group">
155150
<label htmlFor="database">
156-
{getLocString('integrationsMaterializeDatabaseLabel' as any, 'Database')}{' '}
151+
{getLocString('integrationsMaterializeDatabaseLabel', 'Database')}{' '}
157152
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
158153
</label>
159154
<input
160155
type="text"
161156
id="database"
162157
value={pendingConfig.metadata.database}
163158
onChange={handleDatabaseChange}
164-
placeholder={getLocString('integrationsMaterializeDatabasePlaceholder' as any, 'my_database')}
159+
placeholder={getLocString('integrationsMaterializeDatabasePlaceholder', 'my_database')}
165160
autoComplete="off"
166161
required
167162
/>
168163
</div>
169164

170165
<div className="form-group">
171166
<label htmlFor="cluster">
172-
{getLocString('integrationsMaterializeClusterLabel' as any, 'Cluster')}{' '}
167+
{getLocString('integrationsMaterializeClusterLabel', 'Cluster')}{' '}
173168
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
174169
</label>
175170
<input
176171
type="text"
177172
id="cluster"
178173
value={pendingConfig.metadata.cluster}
179174
onChange={handleClusterChange}
180-
placeholder={getLocString('integrationsMaterializeClusterPlaceholder' as any, 'quickstart')}
175+
placeholder={getLocString('integrationsMaterializeClusterPlaceholder', 'quickstart')}
181176
autoComplete="off"
182177
required
183178
/>
184179
</div>
185180

186181
<div className="form-group">
187182
<label htmlFor="username">
188-
{getLocString('integrationsMaterializeUsernameLabel' as any, 'Username')}{' '}
183+
{getLocString('integrationsMaterializeUsernameLabel', 'Username')}{' '}
189184
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
190185
</label>
191186
<input
192187
type="text"
193188
id="username"
194189
value={pendingConfig.metadata.user}
195190
onChange={handleUsernameChange}
196-
placeholder={getLocString('integrationsMaterializeUsernamePlaceholder' as any, 'username')}
191+
placeholder={getLocString('integrationsMaterializeUsernamePlaceholder', 'username')}
197192
autoComplete="username"
198193
required
199194
/>
200195
</div>
201196

202197
<div className="form-group">
203198
<label htmlFor="password">
204-
{getLocString('integrationsMaterializePasswordLabel' as any, 'Password')}{' '}
199+
{getLocString('integrationsMaterializePasswordLabel', 'Password')}{' '}
205200
<span className="required">{getLocString('integrationsRequiredField', '*')}</span>
206201
</label>
207202
<input
208203
type="password"
209204
id="password"
210205
value={pendingConfig.metadata.password}
211206
onChange={handlePasswordChange}
212-
placeholder={getLocString('integrationsMaterializePasswordPlaceholder' as any, '••••••••')}
207+
placeholder={getLocString('integrationsMaterializePasswordPlaceholder', '••••••••')}
213208
autoComplete="current-password"
214209
required
215210
/>

0 commit comments

Comments
 (0)