diff --git a/backend/src/authentication/strategy.ts b/backend/src/authentication/strategy.ts index 0993015..baea97f 100644 --- a/backend/src/authentication/strategy.ts +++ b/backend/src/authentication/strategy.ts @@ -100,7 +100,7 @@ class Strategy extends passport.Strategy { _loadProfile(accessToken: string) { const self = this; - var done = (err: Error | null, profile: any, info: any) => { + const done = (err: Error | null, profile: any, info: any) => { if (err) { self.error(err); return; @@ -112,7 +112,7 @@ class Strategy extends passport.Strategy { self.success(profile, undefined); }; - var verify = (err: Error, user: any) => { + const verify = (err: Error, user: any) => { if (err) { self.error(err); return; @@ -124,7 +124,7 @@ class Strategy extends passport.Strategy { } _redirectToLogin() { - var uri = new URL(this.options.authorizationURL); + const uri = new URL(this.options.authorizationURL); uri.searchParams.append("response_type", "code"); uri.searchParams.append("client_id", this.options.clientID); uri.searchParams.append("redirect_uri", this.options.callbackURL); diff --git a/backend/src/services/rule.service.ts b/backend/src/services/rule.service.ts index 701e2e7..15b9c12 100644 --- a/backend/src/services/rule.service.ts +++ b/backend/src/services/rule.service.ts @@ -72,7 +72,7 @@ export const toExplicitRules = ( const explicitRules: ExplicitRule[] = []; for (const rule_i in rules) { - var current = new Date(from); + let current = new Date(from); const end = new Date(rules[rule_i].end_date); while (true) { if (dayApplies(current, rules[rule_i].day_mask)) { @@ -120,7 +120,7 @@ const mergeIntoList = ( }; export const mergeRules = (rules: ExplicitRule[]): ExplicitRule[] => { - var mergedRules: ExplicitRule[] = []; + let mergedRules: ExplicitRule[] = []; for (const i in rules) { mergedRules = mergeIntoList(rules[i], mergedRules); } @@ -137,7 +137,7 @@ const doesObeyRules = (rules: rule[], event: Event): Error | null => { const start = new Date(event.start); const end = new Date(event.end); - var explicitRules: ExplicitRule[] = mergeRules( + let explicitRules: ExplicitRule[] = mergeRules( toExplicitRules(rules, start, end), ); for (const i in explicitRules) { diff --git a/frontend/src/use-cases/rules/day-mask.element.jsx b/frontend/src/use-cases/rules/day-mask.element.jsx index 8de59cf..f16f5fb 100644 --- a/frontend/src/use-cases/rules/day-mask.element.jsx +++ b/frontend/src/use-cases/rules/day-mask.element.jsx @@ -4,7 +4,7 @@ import "./day-mask.style.css"; const dayArray = day_mask => { const days = []; - for (var i = 0; i < 7; i++) { + for (let i = 0; i < 7; i++) { days.push({ value: day_mask % 2, id: i }); day_mask >>= 1; }