Skip to content

Commit

Permalink
Test custom design for sign in page (#204)
Browse files Browse the repository at this point in the history
* add sign in page

* implement logic

* pr fix

* add necessary line break

* add sign in page

* implement logic

* Add basic header

* add custom styling to sign in page states

* Update eslint rules

* Update eslint.config.js

* add sign in page

* Add basic header

* fix lint errors

* pr fixes

* rebase fixes

* revert to base state

* sort imports

* sorted imports

---------

Co-authored-by: Gokhan Sari <gokhan@sari.me>
  • Loading branch information
iibarbari and th0th authored Nov 15, 2024
1 parent f77e744 commit 5dd2389
Show file tree
Hide file tree
Showing 18 changed files with 257 additions and 60 deletions.
25 changes: 17 additions & 8 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import stylisticTs from "@stylistic/eslint-plugin-ts";
import pluginImport from "eslint-plugin-import";
import jsxA11y from "eslint-plugin-jsx-a11y";
import pluginReact from "eslint-plugin-react";
Expand All @@ -17,6 +18,7 @@ export default [
{
rules: {
"arrow-parens": "error",
"comma-dangle": ["error", "always-multiline"],
"eol-last": ["error"],
eqeqeq: ["error"],
"max-len": ["error", { code: 140, ignoreStrings: true }],
Expand All @@ -28,17 +30,15 @@ export default [
"prefer-destructuring": ["error"],
"quote-props": ["error", "as-needed"],
quotes: ["error", "double", { allowTemplateLiterals: true }],
semi: ["error", "always"],
"semi-style": ["error", "last"],
"sort-keys": "error",
},
},

// import
{
...pluginImport.flatConfigs.recommended,
rules: {
"import/no-extraneous-dependencies": "error",
"import/no-unresolved": "error",
},
settings: {
"import/resolver": {
typescript: {},
Expand Down Expand Up @@ -90,12 +90,21 @@ export default [
},

// typescript
...typescriptEslint.configs.recommended,
{
...typescriptEslint.configs.recommended[0],
languageOptions: {
parser: typescriptEslint.parser,
rules: {
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/no-explicit-any": 0,
},
},

{
plugins: {
"@stylistic/ts": stylisticTs,
},
rules: {
"@stylistic/ts/member-delimiter-style": ["error"],
},
rules: {},
},

// typescript-sort-keys
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@stylistic/eslint-plugin-ts": "^2.10.1",
"@types/express": "^5.0.0",
"@types/node": "^22.7.7",
"@types/react": "^18.3.11",
Expand Down
111 changes: 111 additions & 0 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/src/components/ActivityOverlay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import clsx from "clsx";
import { JSX, PropsWithoutRef } from "react";
import styles from "./ActivityOverlay.module.css";

type ActivityOverlayProps = Overwrite<PropsWithoutRef<JSX.IntrinsicElements["div"]>, {
export type ActivityOverlayProps = Overwrite<PropsWithoutRef<JSX.IntrinsicElements["div"]>, {
isActive: boolean;
}>

Expand Down
3 changes: 0 additions & 3 deletions frontend/src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import { Route, Switch } from "wouter";
import "../../styles/style.css";
import Bootstrap from "~/components/Bootstrap";
import Error from "~/components/Error";
import Header from "~/components/Header";
import Home from "~/components/Home";
import Manifesto from "~/components/Manifesto";
import SignIn from "~/components/SignIn";

export default function App() {
return (
<>
<Header />

<Switch>
<Route component={Bootstrap} path="/bootstrap" />
<Route component={Home} path="/" />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Collapse/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import clsx from "clsx";
import { JSX, PropsWithoutRef, useEffect, useRef, useState } from "react";
import styles from "./Collapse.module.css";

type CollapseProps = Overwrite<PropsWithoutRef<JSX.IntrinsicElements["div"]>, {
export type CollapseProps = Overwrite<PropsWithoutRef<JSX.IntrinsicElements["div"]>, {
open: boolean;
resolution?: "lg";
}>;
Expand Down
Loading

0 comments on commit 5dd2389

Please sign in to comment.