Skip to content

Commit

Permalink
Disable no-var-requires rules… [#905]
Browse files Browse the repository at this point in the history
…everywhere we're currently violating it.
  • Loading branch information
genehack committed Jun 7, 2024
1 parent 0a64312 commit 51bcb6c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions static-site/src/components/Cards/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Cards extends React.Component {
<Padlock/>
</Styles.BottomRightLabel>
) : null}
{/* eslint-disable-next-line @typescript-eslint/no-var-requires */}
{d.img ? <Styles.CardImg src={require(`../../../static/splash_images/${d.img}`).default.src} alt={""} color={d.color}/> : null}
</a>
</Styles.CardInner>
Expand Down
2 changes: 2 additions & 0 deletions static-site/src/components/ListResources/Showcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ const getColor = () => {
const CardImgWrapper = ({filename}) => {
let src;
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
src = require(`../../../static/splash_images/${filename}`).default.src;
} catch {
// eslint-disable-next-line @typescript-eslint/no-var-requires
src = require(`../../../static/splash_images/empty.png`).default.src;
}
return <CardImg src={src} alt={""} color={getColor()}/>
Expand Down
2 changes: 2 additions & 0 deletions static-site/src/components/People/avatars.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const TeamPageList = ({membersKey}) => {
{people.map((person) =>
<Sideways key={person.name} style={{alignItems: person.blurb ? "top" : "center"}}>
<MaybeLinked link={person.link}>
{/* eslint-disable-next-line @typescript-eslint/no-var-requires */}
<img alt={person.name} src={require("../../../static/team/"+person.image).default.src}/>
</MaybeLinked>
<UpDown>
Expand All @@ -121,6 +122,7 @@ export const FooterList = () => {
{people.map((person, i) =>
<div key={person.name}>
<MaybeLinked link={person.link}>
{/* eslint-disable-next-line @typescript-eslint/no-var-requires */}
<img alt={person.name} src={require("../../../static/team/"+person.image).default.src}/>
<Name>{person.name}</Name>
</MaybeLinked>
Expand Down
2 changes: 2 additions & 0 deletions static-site/src/components/logos.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import styled from "styled-components";
import * as Styles from "./splash/styles";

/* eslint-disable @typescript-eslint/no-var-requires */
const fredHutchLogo = require("../../static/logos/fred-hutch-logo-small.png");
const uniBasLogo = require("../../static/logos/unibas-logo.svg");
const nihLogo = require("../../static/logos/nih-logo.jpg");
Expand All @@ -10,6 +11,7 @@ const mapBoxLogo = require("../../static/logos/mapbox-logo-black.svg");
const sibLogo = require("../../static/logos/sib-logo.png");
const ospLogo = require("../../static/logos/osp-logo-small.png");
const bzLogo = require("../../static/logos/bz_logo.png");
/* eslint-enable @typescript-eslint/no-var-requires */

const AllLogosContainer = styled.div`
display: flex;
Expand Down
1 change: 1 addition & 0 deletions static-site/src/sections/sars-cov-2-forecasts-page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import GenericPage from "../layouts/generic-page";
import * as splashStyles from "../components/splash/styles";

// eslint-disable-next-line @typescript-eslint/no-var-requires
const gisaidLogo = require("../../static/logos/gisaid.png");

// Hard-coded content
Expand Down

0 comments on commit 51bcb6c

Please sign in to comment.