Skip to content

Commit

Permalink
Make ESLint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyAppeldoorn committed Aug 10, 2023
1 parent 785942b commit 44f69b6
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 17 deletions.
4 changes: 3 additions & 1 deletion src/components/navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import MobileNavigation from "./Mobile";
import Desktop from "./Desktop";
import { Media } from "../../support/breakpoints";

export default () => (
const Navigation = () => (
<div>
<Media lessThan="computer">
<MobileNavigation />
Expand All @@ -13,3 +13,5 @@ export default () => (
</Media>
</div>
);

export default Navigation;
4 changes: 3 additions & 1 deletion src/modules/feed/components/ActionButton/ActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
import { PATH_ADD_TRANSACTION } from "../../../../routes";
import { Media } from "../../../../support/breakpoints";

export default () => (
const ActionButton = () => (
<div>
<Media lessThan="computer">
<Link to={`${PATH_ADD_TRANSACTION}?transition=slideup`}>
Expand All @@ -31,3 +31,5 @@ export default () => (
</Media>
</div>
);

export default ActionButton;
2 changes: 0 additions & 2 deletions src/modules/feed/components/CreatePost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ export class CreatePost extends Component<CreatePostProps, CreatePostState> {
/>
<Form.Field>
{/* Suppressed because the linter doesn't pick up on custom controls */}
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
<label htmlFor="input-receivers">
Receivers
<UserDropdown
Expand Down Expand Up @@ -351,7 +350,6 @@ export class CreatePost extends Component<CreatePostProps, CreatePostState> {

<Form.Field>
{/* Suppressed because the linter doesn't pick up on custom controls */}
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
<label htmlFor="image-upload">
Images
<ImageUpload
Expand Down
4 changes: 2 additions & 2 deletions src/modules/feed/components/GuidelineInput/GuidelineInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ class GuidelineInput extends Component<Props, State> {
guidelines = data.teamById.guidelines.filter(
(guideline) =>
guideline.kudos - KUDO_GUIDELINE_RANGE <
(this.state.amount || 0) &&
(parseInt(this.state.amount) || 0) &&
guideline.kudos + KUDO_GUIDELINE_RANGE >
(this.state.amount || 0)
(parseInt(this.state.amount) || 0),
);
} else {
guidelines = data.teamById.guidelines;
Expand Down
12 changes: 7 additions & 5 deletions src/modules/feed/components/RightRail.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import React from 'react';
import { Segment } from 'semantic-ui-react';
import { Statistics } from '../../statistics';
import React from "react";
import { Segment } from "semantic-ui-react";
import { Statistics } from "../../statistics";

import s from './Rail.module.scss';
import s from "./Rail.module.scss";

const slackIconPath = `${process.env.PUBLIC_URL}/assets/kabisa_logo_white.png`;

export default () => (
const RightRail = () => (
<Segment className={s.rail}>
<Statistics />
<img className={s.logo} alt="Kabisa logo" src={slackIconPath} />
</Segment>
);

export default RightRail;
1 change: 1 addition & 0 deletions src/modules/feed/components/Transaction/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Storage } from "../../../../support/storage";
import s from "./Header.module.scss";
import { Auth } from "../../../../support";

// eslint-disable-next-line @typescript-eslint/no-var-requires
const moment = require("moment-twitter");

export const MUTATION_REMOVE_POST = gql`
Expand Down
5 changes: 2 additions & 3 deletions src/modules/feed/components/Transaction/LikeButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions */
import React from "react";
import { Button, Icon } from "semantic-ui-react";
import { gql } from "@apollo/client";
Expand Down Expand Up @@ -58,7 +57,7 @@ const updateState = (store: any, newData: FragmentPostResult) => {
}

return newData;
}
},
),
},
};
Expand All @@ -73,7 +72,7 @@ const updateState = (store: any, newData: FragmentPostResult) => {
export const toggleLike = (
mutate: any,
transactionId: string,
post: FragmentPostResult
post: FragmentPostResult,
) => {
mutate({
variables: { id: transactionId },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Storage } from "../../../../support/storage";
import settings from "../../../../config/settings";
import { SlackSection } from "./SlackSection";

// eslint-disable-next-line @typescript-eslint/no-var-requires
const queryString = require("query-string");

export const REMOVE_SLACK = gql`
Expand Down Expand Up @@ -57,7 +58,7 @@ export default class IntegrationsSection extends React.Component<
any
> {
slackConnectUrl = `${settings.API_BASE_URL}/auth/slack/team/${Storage.getItem(
settings.TEAM_ID_TOKEN
settings.TEAM_ID_TOKEN,
)}`;

constructor(props: IntegrationsSectionProps) {
Expand All @@ -68,7 +69,7 @@ export default class IntegrationsSection extends React.Component<

if (auth === "ok") {
toast.success(
"Connected to Slack! You should receive a Slack message shortly to confirm this."
"Connected to Slack! You should receive a Slack message shortly to confirm this.",
);
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/modules/user/UserPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
SlackDisconnectedSegment,
} from "./SlackSection";

// eslint-disable-next-line @typescript-eslint/no-var-requires
const queryString = require("query-string");

export const DISCONNECT_SLACK = gql`
Expand Down Expand Up @@ -68,7 +69,7 @@ export interface State {

export class UserPage extends React.Component<Props, State> {
slackConnectUrl = `${settings.API_BASE_URL}/auth/slack/user/${Storage.getItem(
settings.USER_ID_TOKEN
settings.USER_ID_TOKEN,
)}`;

slackIconPath = `${process.env.PUBLIC_URL}/assets/slack_logo.png`;
Expand Down

0 comments on commit 44f69b6

Please sign in to comment.