Skip to content

Commit f31ed18

Browse files
committed
fix(lint): fixing lint in test files
1 parent a7295b4 commit f31ed18

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

core/src/components/input/input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ export class Input implements ComponentInterface {
902902
onCompositionstart={this.onCompositionStart}
903903
onCompositionend={this.onCompositionEnd}
904904
aria-describedby={this.getHintTextID()}
905-
aria-invalid={this.isInvalid ? 'true' : 'false'}
905+
aria-invalid={this.isInvalid ? 'true' : undefined}
906906
{...this.inheritedAttributes}
907907
/>
908908
{this.clearInput && !readonly && !disabled && (

core/src/components/input/test/validation/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ <h2>Optional Field (No Validation)</h2>
202202
const age = parseInt(value);
203203
return age >= 18 && age <= 120;
204204
},
205-
'optional-input': () => true // Always valid
205+
'optional-input': () => true, // Always valid
206206
};
207207

208208
function validateField(input) {
@@ -227,7 +227,7 @@ <h2>Optional Field (No Validation)</h2>
227227

228228
function validateForm() {
229229
let allValid = true;
230-
inputs.forEach(input => {
230+
inputs.forEach((input) => {
231231
if (input.id !== 'optional-input') {
232232
const isValid = validateField(input);
233233
if (!isValid) {
@@ -240,13 +240,13 @@ <h2>Optional Field (No Validation)</h2>
240240
}
241241

242242
// Add event listeners
243-
inputs.forEach(input => {
243+
inputs.forEach((input) => {
244244
// Mark as touched on blur
245245
input.addEventListener('ionBlur', (e) => {
246246
touchedFields.add(input.id);
247247
validateField(input);
248248
validateForm();
249-
249+
250250
// Debug: Log to hidden aria-live region for testing
251251
const isInvalid = input.classList.contains('ion-invalid');
252252
if (isInvalid) {
@@ -276,7 +276,7 @@ <h2>Optional Field (No Validation)</h2>
276276

277277
// Reset button
278278
resetBtn.addEventListener('click', () => {
279-
inputs.forEach(input => {
279+
inputs.forEach((input) => {
280280
input.value = '';
281281
input.classList.remove('ion-valid', 'ion-invalid', 'ion-touched');
282282
});
@@ -296,4 +296,4 @@ <h2>Optional Field (No Validation)</h2>
296296
validateForm();
297297
</script>
298298
</body>
299-
</html>
299+
</html>

core/src/components/textarea/test/validation/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ <h2>Optional Notes</h2>
203203
'review-textarea': (value) => {
204204
return value && value.length >= 50 && value.length <= 500;
205205
},
206-
'notes-textarea': () => true // Always valid (optional)
206+
'notes-textarea': () => true, // Always valid (optional)
207207
};
208208

209209
function validateField(textarea) {
@@ -228,7 +228,7 @@ <h2>Optional Notes</h2>
228228

229229
function validateForm() {
230230
let allValid = true;
231-
textareas.forEach(textarea => {
231+
textareas.forEach((textarea) => {
232232
if (textarea.id !== 'notes-textarea') {
233233
const isValid = validateField(textarea);
234234
if (!isValid) {
@@ -241,13 +241,13 @@ <h2>Optional Notes</h2>
241241
}
242242

243243
// Add event listeners
244-
textareas.forEach(textarea => {
244+
textareas.forEach((textarea) => {
245245
// Mark as touched on blur
246246
textarea.addEventListener('ionBlur', (e) => {
247247
touchedFields.add(textarea.id);
248248
validateField(textarea);
249249
validateForm();
250-
250+
251251
// Debug: Log to hidden aria-live region for testing
252252
const isInvalid = textarea.classList.contains('ion-invalid');
253253
if (isInvalid) {
@@ -277,7 +277,7 @@ <h2>Optional Notes</h2>
277277

278278
// Reset button
279279
resetBtn.addEventListener('click', () => {
280-
textareas.forEach(textarea => {
280+
textareas.forEach((textarea) => {
281281
textarea.value = '';
282282
textarea.classList.remove('ion-valid', 'ion-invalid', 'ion-touched');
283283
});
@@ -297,4 +297,4 @@ <h2>Optional Notes</h2>
297297
validateForm();
298298
</script>
299299
</body>
300-
</html>
300+
</html>

core/src/components/textarea/textarea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ export class Textarea implements ComponentInterface {
816816
onFocus={this.onFocus}
817817
onKeyDown={this.onKeyDown}
818818
aria-describedby={this.getHintTextID()}
819-
aria-invalid={this.isInvalid ? 'true' : 'false'}
819+
aria-invalid={this.isInvalid ? 'true' : undefined}
820820
{...this.inheritedAttributes}
821821
>
822822
{value}

0 commit comments

Comments
 (0)