eslint cleanup

This commit is contained in:
Djeeberjr 2021-11-15 23:31:09 +01:00
parent 35475e36db
commit b0b6e7084e
15 changed files with 333 additions and 331 deletions

View File

@ -6,7 +6,7 @@ import Side from "./types/Side"
* @param item what item * @param item what item
* @param side CT or T * @param side CT or T
*/ */
function ItemToDisplay(item:Item, side: Side ):string { function ItemToDisplay(item:Item, side: Side ):string {
switch (item) { switch (item) {
case Item.DEFAULT_PISTOL: case Item.DEFAULT_PISTOL:
return side === Side.CT ? "USP-S / P2000":"Glock-18" return side === Side.CT ? "USP-S / P2000":"Glock-18"

View File

@ -1,7 +1,7 @@
import React, { useState } from 'react'; import React, { useState } from "react"
import RetakesConfig from '../types/RetakesConfig'; import RetakesConfig from "../types/RetakesConfig"
import AllDecks from './AllDecks'; import AllDecks from "./AllDecks"
import MenuBar from './MenuBar'; import MenuBar from "./MenuBar"
function App() { function App() {
@ -21,7 +21,7 @@ function App() {
/> />
<AllDecks retakesConfig={retakesConfig} onChange={(newConfig)=>setRetakesConfig(newConfig)} /> <AllDecks retakesConfig={retakesConfig} onChange={(newConfig)=>setRetakesConfig(newConfig)} />
</div> </div>
); )
} }
export default App; export default App

View File

@ -25,10 +25,12 @@ const TextEdit: React.FC<Props> = ({text,onChange}) => {
<> <>
{!edit && <span className="cursor-pointer" onClick={()=>setEdit(true)} >{inputValue}</span>} {!edit && <span className="cursor-pointer" onClick={()=>setEdit(true)} >{inputValue}</span>}
{edit && {edit &&
<form className="inline" onSubmit={(e)=>{ <form className="inline"
onSubmit={(e)=>{
e.preventDefault() e.preventDefault()
setEdit(false) setEdit(false)
}} > }}
>
<input <input
type="text" type="text"
className="bg-transparent outline-none font-bold" className="bg-transparent outline-none font-bold"

View File

@ -1,11 +1,11 @@
import React from 'react'; import React from "react"
import ReactDOM from 'react-dom'; import ReactDOM from "react-dom"
import App from './components/App'; import App from "./components/App"
import './index.css'; import "./index.css"
ReactDOM.render( ReactDOM.render(
<React.StrictMode> <React.StrictMode>
<App /> <App />
</React.StrictMode>, </React.StrictMode>,
document.getElementById('root') document.getElementById("root")
); )

View File

@ -21,7 +21,7 @@ class Card {
/** /**
* Converts a boolean to 1 for true and 0 for false * Converts a boolean to 1 for true and 0 for false
*/ */
function bToS(bool: boolean): string{ function bToS(bool: boolean): string{
return bool?"1":"0" return bool?"1":"0"
} }