From 0a4316b0ae17664958a0ee37e3f2d1536bff94e7 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Wed, 23 Sep 2020 14:04:00 +0200 Subject: [PATCH] fix(client): update eslint and fix issues The eslint config now includes rules that have been added to Gatsby. This uncovered some problems with missing labels that have been fixed. --- .eslintrc.json | 1 + client/src/components/profile/components/TimeLine.js | 2 -- client/src/templates/Challenges/video/Show.js | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 15c242ebed..7b0c7f9188 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,6 +19,7 @@ "jsx-a11y/aria-proptypes": "error", "jsx-a11y/aria-role": "error", "jsx-a11y/aria-unsupported-elements": "error", + "jsx-a11y/control-has-associated-label": "error", "jsx-a11y/click-events-have-key-events": "error", "jsx-a11y/heading-has-content": "error", "jsx-a11y/html-has-lang": "error", diff --git a/client/src/components/profile/components/TimeLine.js b/client/src/components/profile/components/TimeLine.js index b82fc0e250..7566f859f3 100644 --- a/client/src/components/profile/components/TimeLine.js +++ b/client/src/components/profile/components/TimeLine.js @@ -103,7 +103,6 @@ class TimelineInner extends Component { {format(completedDate, 'MMMM D, YYYY')} - ); } @@ -170,7 +169,6 @@ class TimelineInner extends Component { Challenge Completed - diff --git a/client/src/templates/Challenges/video/Show.js b/client/src/templates/Challenges/video/Show.js index f6cee59923..5b27aed1b3 100644 --- a/client/src/templates/Challenges/video/Show.js +++ b/client/src/templates/Challenges/video/Show.js @@ -233,6 +233,7 @@ export class Project extends Component { // index should be fine as a key: