Fix eslint warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-27 19:27:44 +01:00
parent 487ac56b4c
commit da42522073
130 changed files with 702 additions and 734 deletions

View File

@@ -52,21 +52,21 @@ export default class PasswordReset extends Vue {
errors: string[] = [];
rules = {
passwordLength: (value: string) =>
passwordLength: (value: string): boolean | string =>
value.length > 6 || "Password must be at least 6 characters long",
required: validateRequiredField,
passwordEqual: (value: string) =>
passwordEqual: (value: string): boolean | string =>
value === this.credentials.password || "Passwords must be the same",
};
get samePasswords() {
get samePasswords(): boolean {
return (
this.rules.passwordLength(this.credentials.password) === true &&
this.credentials.password === this.credentials.passwordConfirmation
);
}
async resetAction(e: Event) {
async resetAction(e: Event): Promise<void> {
e.preventDefault();
this.errors.splice(0);