From 31990b982d14027a88db75cea91f9d4848fbef14 Mon Sep 17 00:00:00 2001 From: Armen Zambrano G Date: Wed, 21 Aug 2019 16:14:05 -0400 Subject: [PATCH] Few linting exceptions --- .eslintrc.js | 3 +++ ui/shared/auth/AuthService.js | 1 + ui/test-view/redux/configureStore.js | 2 +- ui/test-view/ui/Test.jsx | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 19e0d5b7a..868823ef2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,6 +30,7 @@ module.exports = { 'consistent-return': 'off', 'default-case': 'off', 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/control-has-associated-label': 'off', 'jsx-a11y/label-has-for': 'off', 'jsx-a11y/no-noninteractive-element-interactions': 'off', 'jsx-a11y/no-static-element-interactions': 'off', @@ -42,6 +43,8 @@ module.exports = { 'no-underscore-dangle': 'off', 'prefer-promise-reject-errors': 'off', 'react/destructuring-assignment': 'off', + 'react/jsx-fragments': 'off', + 'react/jsx-props-no-spreading': 'off', 'react/forbid-prop-types': 'off', 'react/prop-types': 'off', // Override AirBnB's config for this rule to make it more strict. diff --git a/ui/shared/auth/AuthService.js b/ui/shared/auth/AuthService.js index 16838a55f..cbecf3b61 100644 --- a/ui/shared/auth/AuthService.js +++ b/ui/shared/auth/AuthService.js @@ -15,6 +15,7 @@ export default class AuthService { _fetchUser(userSession) { const loginUrl = getApiUrl('/auth/login/'); + // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { const userResponse = await fetch(loginUrl, { headers: { diff --git a/ui/test-view/redux/configureStore.js b/ui/test-view/redux/configureStore.js index 9bbf2cc24..1c7a8adee 100644 --- a/ui/test-view/redux/configureStore.js +++ b/ui/test-view/redux/configureStore.js @@ -180,7 +180,7 @@ async function fetchTests(store, fetchParams) { Object.entries(testFailureLines).forEach(([testName, test]) => { // Make a copy of the job that is just for this single testName because each test // needs its own job copy that contains the failureLines for only that test. - const flJob = Object.assign({}, job); + const flJob = { ...job }; test.jobs = [flJob]; test.name = testName; // set the failureLines of this test to this test's job diff --git a/ui/test-view/ui/Test.jsx b/ui/test-view/ui/Test.jsx index e461b1023..6e7edddc7 100644 --- a/ui/test-view/ui/Test.jsx +++ b/ui/test-view/ui/Test.jsx @@ -1,3 +1,4 @@ +/* eslint-disable max-classes-per-file */ import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom';