From 74c3930e0a5ed264f330bc32c27116ead1063c5d Mon Sep 17 00:00:00 2001 From: Ven Date: Thu, 6 Oct 2022 00:42:58 +0200 Subject: add eslint config (#53) * eslint * workflow * lint main --- src/components/ErrorBoundary.tsx | 2 +- src/components/Flex.tsx | 3 +-- src/components/Settings.tsx | 12 ++++++------ src/components/Updater.tsx | 6 +++--- 4 files changed, 11 insertions(+), 12 deletions(-) (limited to 'src/components') diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx index 21a3155..83f35e6 100644 --- a/src/components/ErrorBoundary.tsx +++ b/src/components/ErrorBoundary.tsx @@ -15,7 +15,7 @@ const NO_ERROR = {}; export default class ErrorBoundary extends React.Component> { static wrap(Component: React.ComponentType): (props: T) => React.ReactElement { - return (props) => ( + return props => ( diff --git a/src/components/Flex.tsx b/src/components/Flex.tsx index 881c7c2..eda3b33 100644 --- a/src/components/Flex.tsx +++ b/src/components/Flex.tsx @@ -1,5 +1,4 @@ -import { PropsWithChildren } from "react"; -import type { React } from '../webpack/common'; +import type { React } from "../webpack/common"; export function Flex(props: React.PropsWithChildren<{ flexDirection?: React.CSSProperties["flexDirection"]; diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index 0678745..56c97cb 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -1,14 +1,14 @@ import { classes, humanFriendlyJoin, useAwaiter } from "../utils/misc"; -import Plugins from 'plugins'; +import Plugins from "plugins"; import { useSettings } from "../api/settings"; import IpcEvents from "../utils/IpcEvents"; import { Button, Switch, Forms, React, Margins, Toasts, Alerts, Parser } from "../webpack/common"; import ErrorBoundary from "./ErrorBoundary"; import { startPlugin } from "../plugins"; -import { stopPlugin } from '../plugins/index'; -import { Flex } from './Flex'; -import { ChangeList } from '../utils/ChangeList'; +import { stopPlugin } from "../plugins/index"; +import { Flex } from "./Flex"; +import { ChangeList } from "../utils/ChangeList"; function showErrorToast(message: string) { Toasts.show({ @@ -35,7 +35,7 @@ export default ErrorBoundary.wrap(function Settings() {
{changes.map((s, i) => ( <> {i > 0 && ", "} - {Parser.parse('`' + s + '`')} + {Parser.parse("`" + s + "`")} ))}
@@ -69,7 +69,7 @@ export default ErrorBoundary.wrap(function Settings() { - SettingsDir: {settingsDir} + SettingsDir: {settingsDir} {!IS_WEB && diff --git a/src/components/Updater.tsx b/src/components/Updater.tsx index 1ed56d6..5e7e84f 100644 --- a/src/components/Updater.tsx +++ b/src/components/Updater.tsx @@ -1,8 +1,8 @@ import gitHash from "git-hash"; -import { changes, checkForUpdates, getRepo, rebuild, update, UpdateLogger, updateError, isOutdated, isNewer } from '../utils/updater'; -import { React, Forms, Button, Margins, Alerts, Card, Parser, Toasts } from '../webpack/common'; +import { changes, checkForUpdates, getRepo, rebuild, update, UpdateLogger, updateError, isOutdated, isNewer } from "../utils/updater"; +import { React, Forms, Button, Margins, Alerts, Card, Parser, Toasts } from "../webpack/common"; import { Flex } from "./Flex"; -import { classes, useAwaiter } from '../utils/misc'; +import { classes, useAwaiter } from "../utils/misc"; import { Link } from "./Link"; import ErrorBoundary from "./ErrorBoundary"; import { ErrorCard } from "./ErrorCard"; -- cgit