From 0ad80a63cfde23f45f409dc9895e954d53098e6a Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Wed, 12 Aug 2020 17:16:28 -0400 Subject: [PATCH] Fix lint warnings; require 0 warnings for Travis build (#181) --- .travis.yml | 2 +- src/course-home/progress-tab/Subsection.jsx | 1 + src/courseware/course/sequence/Unit.jsx | 2 +- src/toast/LearningToast.jsx | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 92b984a8..136ca946 100755 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ install: script: - make validate-no-uncommitted-package-lock-changes - npm run i18n_extract -- npm run lint +- npm run lint -- --max-warnings 0 - npm run test - npm run build - npm run is-es5 diff --git a/src/course-home/progress-tab/Subsection.jsx b/src/course-home/progress-tab/Subsection.jsx index 46c5f4b8..d65f507d 100644 --- a/src/course-home/progress-tab/Subsection.jsx +++ b/src/course-home/progress-tab/Subsection.jsx @@ -24,6 +24,7 @@ function Subsection({
+ {/* eslint-disable-next-line react/no-danger */}
{showTotalScore && {totalScoreSr}} diff --git a/src/courseware/course/sequence/Unit.jsx b/src/courseware/course/sequence/Unit.jsx index ff430946..e17a0b59 100644 --- a/src/courseware/course/sequence/Unit.jsx +++ b/src/courseware/course/sequence/Unit.jsx @@ -140,7 +140,7 @@ function Unit({ scrolling="no" referrerPolicy="origin" onLoad={() => { - window.onmessage = function (e) { + window.onmessage = function handleResetDates(e) { if (e.data.event_name) { dispatch(processEvent(e.data, fetchCourse)); } diff --git a/src/toast/LearningToast.jsx b/src/toast/LearningToast.jsx index 24a88794..66274fd1 100644 --- a/src/toast/LearningToast.jsx +++ b/src/toast/LearningToast.jsx @@ -25,9 +25,11 @@ export default function LearningToast({ }} > + {/* eslint-disable-next-line react/no-danger */}
+ {/* eslint-disable-next-line react/no-danger */}