From 2f0410bfeab6316dde9542391ed3bcedba8ac1e9 Mon Sep 17 00:00:00 2001 From: Prozilla Date: Wed, 16 Aug 2023 19:12:56 +0200 Subject: [PATCH] Maintenance --- package.json | 4 +++- src/App.test.js | 8 -------- src/components/desktop/Desktop.jsx | 6 +++++- src/constants/branding.js | 30 +++++++++++++++--------------- src/index.js | 7 ++++++- src/reportWebVitals.js | 2 +- src/setupTests.js | 2 +- 7 files changed, 31 insertions(+), 28 deletions(-) delete mode 100644 src/App.test.js diff --git a/package.json b/package.json index f1436ad..4b5f729 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,9 @@ "double" ], "default-case": "off", - "no-multi-comp": "off", + "arrow-parens": "error", + "space-infix-ops": "warn", + "react/no-multi-comp": "error", "jsdoc/no-undefined-types": "warn", "jsdoc/require-param": "warn", "jsdoc/check-tag-names": "warn", diff --git a/src/App.test.js b/src/App.test.js deleted file mode 100644 index f9f7b24..0000000 --- a/src/App.test.js +++ /dev/null @@ -1,8 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import App from "./App"; - -test("renders learn react link", () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/src/components/desktop/Desktop.jsx b/src/components/desktop/Desktop.jsx index 4debd82..1d65d46 100644 --- a/src/components/desktop/Desktop.jsx +++ b/src/components/desktop/Desktop.jsx @@ -29,7 +29,11 @@ export function Desktop() { }, [settingsManager]); return (<> -
+
); diff --git a/src/constants/branding.js b/src/constants/branding.js index 2bb43cf..5bc35cc 100644 --- a/src/constants/branding.js +++ b/src/constants/branding.js @@ -1,18 +1,18 @@ export const NAME = "ProzillaOS"; export const ASCII_LOGO = ` - :. - -==. - .=====: - ---::..:=======-. - :===+=----------::.. - =+=---------------:.. - --------------------:. - .:-+=----*###*--*####=---. - :==+----#%+-+%#-##%*+----:. - .=----#%+-+%#-*+-%#+---:. - ==----*###*--*###*----. - ==+-------------------:. - ...::---------------:. - .::---------::.. - ....::... `; \ No newline at end of file + :. + -==. + .=====: + ---::..:=======-. + :===+=----------::.. + =+=---------------:.. + --------------------:. +.:-+=----*###*--*####=---. +:==+----#%+-+%#-##%*+----:. + .=----#%+-+%#-*+-%#+---:. + ==----*###*--*###*----. + ==+-------------------:. + ...::---------------:. + .::---------::.. + ....::... `; \ No newline at end of file diff --git a/src/index.js b/src/index.js index 72bcc31..8730450 100644 --- a/src/index.js +++ b/src/index.js @@ -7,6 +7,7 @@ import { ASCII_LOGO } from "./constants/branding.js"; export const START_DATE = new Date(); +// Render app const root = ReactDOM.createRoot(document.getElementById("root")); root.render( @@ -14,7 +15,11 @@ root.render( ); -console.log(ASCII_LOGO); +// Log welcome message +const asciiLogoWidth = ASCII_LOGO.split("\n")[1].length; +const welcomeMessage = "Welcome to ProzillaOS"; +const space = "\n\n" + " ".repeat(Math.ceil((asciiLogoWidth - welcomeMessage.length) / 2)); +console.info(ASCII_LOGO + space + welcomeMessage); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js index b84db74..45a848b 100644 --- a/src/reportWebVitals.js +++ b/src/reportWebVitals.js @@ -1,4 +1,4 @@ -const reportWebVitals = onPerfEntry => { +const reportWebVitals = (onPerfEntry) => { if (onPerfEntry && onPerfEntry instanceof Function) { import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); diff --git a/src/setupTests.js b/src/setupTests.js index 8f2609b..1dd407a 100644 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -2,4 +2,4 @@ // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; +import "@testing-library/jest-dom";