Skip to content

Commit

Permalink
no unused locals, parameters and implicit returns
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Mar 31, 2021
1 parent 4ae1697 commit 29165c5
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 20 deletions.
3 changes: 2 additions & 1 deletion web/src/components/accounts/account.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { PencilFill, Power } from 'react-bootstrap-icons';
import { login, logout } from '../../services/accounts';
import { fetchSteamUserImage } from './util';
Expand Down Expand Up @@ -28,6 +27,8 @@ function Button({ Icon, color, paddingLeft, onMouseDown }: any) {
);
}

// TODO: Standardize thumbnail images
// The accounts/account.tsx and trades/item.tsx images could be standardized (bootstrap '.img-thumbnail' ??) and extracted to a dedicated file.
function ProfilePhoto({ account }: any) {
return (
<img
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/accounts/form.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component } from 'react';
import { Component } from 'react';
import { AccountOptions, createAccount } from '../../services/accounts';

interface FormInputs {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/accounts/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect, Fragment } from 'react';
import { useState, useEffect, Fragment } from 'react';
import Account from './account';
import { Offcanvas, Button } from './offcanvas';
import { AccountOptions, getAccounts } from '../../services/accounts';
Expand Down
1 change: 0 additions & 1 deletion web/src/components/accounts/offcanvas.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import OffcanvasTemplate from '../offcanvas';
import Form from './form';

Expand Down
2 changes: 1 addition & 1 deletion web/src/components/infoBox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Fragment } from 'react';
import {Fragment } from 'react';

export default function InfoBox({ title, children }: any) {
return (
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/logs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState, useRef, DetailedHTMLProps, HTMLAttributes } from 'react';
import { useEffect, useState, useRef } from 'react';
import Log from './log';
import socket from '../../services/socket';

Expand Down
1 change: 0 additions & 1 deletion web/src/components/logs/log.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { getColor } from './util';

export default function Log({ log }: any) {
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/offCanvas.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export default function OffCanvas({ id, title, children}: any) {
return (
<div className="offcanvas offcanvas-start" id={id} aria-labelledby="offcanvasLabel">
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/trades/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState, Fragment } from 'react';
import { useEffect, useState, Fragment } from 'react';
import Trade from './trade';
import socket from '../../services/socket';

Expand Down
1 change: 0 additions & 1 deletion web/src/components/trades/item.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { Item, getItemName, getImageUrl } from './util';
import { GiftFill } from 'react-bootstrap-icons';

Expand Down
1 change: 0 additions & 1 deletion web/src/components/trades/trade.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React, { Fragment } from 'react';
import ItemFrame, { EmptyItemFrame } from './item';
import { Item, Trade as ITrade } from './util';
import { ArrowLeftRight } from 'react-bootstrap-icons';
Expand Down
2 changes: 0 additions & 2 deletions web/src/header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export default function Header() {
return (
<header id="header" className="shadow">
Expand Down
2 changes: 1 addition & 1 deletion web/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Fragment } from 'react';
import { Fragment } from 'react';
import ReactDOM from 'react-dom';

import Header from './header';
Expand Down
2 changes: 0 additions & 2 deletions web/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import InfoBox from './components/infoBox';
import Logs from './components/logs';
import Accounts from './components/accounts';
Expand Down
6 changes: 3 additions & 3 deletions web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */,

/* Additional Checks */
"noUnusedLocals": false /* Report errors on unused locals. */,
"noUnusedParameters": false /* Report errors on unused parameters. */,
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noUnusedLocals": true /* Report errors on unused locals. */,
"noUnusedParameters": true /* Report errors on unused parameters. */,
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
// "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
Expand Down

0 comments on commit 29165c5

Please sign in to comment.