Skip to content

Commit 74755df

Browse files
committed
fix lint errors
1 parent a6a051a commit 74755df

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

packages/combo-box/src/vaadin-combo-box-light-mixin.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,6 @@ export const ComboBoxLightMixin = (superClass) =>
9999
});
100100
}
101101

102-
/**
103-
* Returns true if the current input value satisfies all constraints (if any).
104-
* @return {boolean}
105-
*/
106-
checkValidity() {
107-
if (this.inputElement && this.inputElement.validate) {
108-
return this.inputElement.validate();
109-
}
110-
return super.checkValidity();
111-
}
112-
113102
/**
114103
* @protected
115104
* @override

packages/date-picker/src/vaadin-date-picker-mixin.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -624,13 +624,8 @@ export const DatePickerMixin = (subclass) =>
624624
!this._selectedDate || dateAllowed(this._selectedDate, this._minDate, this._maxDate, this.isDateDisabled);
625625

626626
let inputValidity = true;
627-
if (this.inputElement) {
628-
if (this.inputElement.checkValidity) {
629-
inputValidity = this.inputElement.checkValidity();
630-
} else if (this.inputElement.validate) {
631-
// Iron-form-elements have the validate API
632-
inputValidity = this.inputElement.validate();
633-
}
627+
if (this.inputElement && this.inputElement.checkValidity) {
628+
inputValidity = this.inputElement.checkValidity();
634629
}
635630

636631
return inputValid && isDateValid && inputValidity;

packages/login/src/vaadin-login-form-mixin.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ export const LoginFormMixin = (superClass) =>
5050
const userName = this.$.vaadinLoginUsername;
5151
const password = this.$.vaadinLoginPassword;
5252

53-
if (this.disabled || !(userName.validate() && password.validate())) {
53+
// eslint-disable-next-line no-restricted-syntax
54+
userName.validate();
55+
// eslint-disable-next-line no-restricted-syntax
56+
password.validate();
57+
58+
if (this.disabled || userName.invalid || password.invalid) {
5459
return;
5560
}
5661

@@ -114,6 +119,7 @@ export const LoginFormMixin = (superClass) =>
114119
const { currentTarget: inputActive } = e;
115120
const nextInput =
116121
inputActive.id === 'vaadinLoginUsername' ? this.$.vaadinLoginPassword : this.$.vaadinLoginUsername;
122+
// eslint-disable-next-line no-restricted-syntax
117123
if (inputActive.validate()) {
118124
if (nextInput.checkValidity()) {
119125
this.submit();

0 commit comments

Comments
 (0)