Fix lint warnings; require 0 warnings for Travis build (#181)

This commit is contained in:
Kyle McCormick
2020-08-12 17:16:28 -04:00
committed by GitHub
parent bc76adf8eb
commit 0ad80a63cf
4 changed files with 5 additions and 2 deletions

View File

@@ -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

View File

@@ -24,6 +24,7 @@ function Subsection({
<section className="my-3 ml-3">
<div className="row">
<a className="h6" href={subsection.url}>
{/* eslint-disable-next-line react/no-danger */}
<div dangerouslySetInnerHTML={{ __html: subsection.displayName }} />
{showTotalScore && <span className="sr-only">{totalScoreSr}</span>}
</a>

View File

@@ -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));
}

View File

@@ -25,9 +25,11 @@ export default function LearningToast({
}}
>
<Toast.Header className="bg-gray-700 border-bottom-0 text-light">
{/* eslint-disable-next-line react/no-danger */}
<div dangerouslySetInnerHTML={{ __html: header }} />
</Toast.Header>
<Toast.Body className="bg-gray-700 text-light">
{/* eslint-disable-next-line react/no-danger */}
<div dangerouslySetInnerHTML={{ __html: body }} />
</Toast.Body>
</Toast>