Updated eslint stuff
This commit is contained in:
parent
7b8a53fe2a
commit
9b2b005893
1 changed files with 5 additions and 1 deletions
|
@ -10,7 +10,9 @@ import unknownCommand from "../app/commands/unknown";
|
|||
const Terminal: React.FC = () => {
|
||||
const [input, setInput] = useState("");
|
||||
const [output, setOutput] = useState<JSX.Element[]>([<MOTD key="motd" />]);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const [history, setHistory] = useState<string[]>([]);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const [historyIndex, setHistoryIndex] = useState<number | null>(null);
|
||||
const [suggestion, setSuggestion] = useState<string | null>(null);
|
||||
const [inputDisabled, setInputDisabled] = useState(false); // Disable input after exit
|
||||
|
@ -35,7 +37,7 @@ const Terminal: React.FC = () => {
|
|||
}
|
||||
|
||||
const normalizedInput = input.toLowerCase();
|
||||
const commands: { [key: string]: (setInputDisabled: any, setOutput: any) => JSX.Element[] } = {
|
||||
const commands: { [key: string]: (setInputDisabled: never, setOutput: never) => JSX.Element[] } = {
|
||||
help: helpCommand,
|
||||
socials: socialsCommand,
|
||||
exit: () => exitCommand(setInputDisabled, setOutput), // Pass control functions
|
||||
|
@ -48,6 +50,8 @@ const Terminal: React.FC = () => {
|
|||
setOutput((prev) => [
|
||||
...prev,
|
||||
<div key={`cmd-${input}`}>$ {input}</div>,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
...commandOutput(),
|
||||
]);
|
||||
setHistory((prev) => [...prev, input]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue