-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add react-hook-form and yup, add eslint setting for react and i…
…mport order, add two pages, add paths annotations
- Loading branch information
Showing
15 changed files
with
1,289 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"root": true, | ||
"env": { "browser": true, "es2020": true }, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended" | ||
], | ||
"ignorePatterns": ["dist", ".eslintrc.cjs"], | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["react-refresh", "react", "@typescript-eslint", "import"], | ||
"rules": { | ||
"react/react-in-jsx-scope": 0, | ||
"react/display-name": 0, | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"react/jsx-props-no-spreading": "off", | ||
"react/jsx-no-useless-fragment": "off", | ||
"no-console": ["warn", { "allow": ["warn", "error"] }], | ||
|
||
"import/order": [ | ||
"error", | ||
{ | ||
"groups": [["builtin", "external"], ["parent", "sibling"], "index"], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
], | ||
"import/prefer-default-export": "off", | ||
|
||
"react/self-closing-comp": [ | ||
"error", | ||
{ | ||
"component": true, | ||
"html": true | ||
} | ||
], | ||
"react/function-component-definition": [ | ||
2, | ||
{ "namedComponents": "function-declaration" } | ||
], | ||
"react/jsx-one-expression-per-line": "off" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
import { HashRouter } from 'react-router-dom'; | ||
import styled from 'styled-components'; | ||
|
||
export const HashRouterStyled = styled(HashRouter)` | ||
width: 100%; | ||
height: 100%; | ||
export const AppStyled = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
`; | ||
|
||
export const LinkSegment = styled.div` | ||
display: flex; | ||
gap: 1rem; | ||
`; | ||
export const HelloWorldStyled = styled.p` | ||
font-size: 2rem; | ||
width: fit-content; | ||
padding: 1rem; | ||
border: solid 1px black; | ||
border-radius: 5px; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function ChangePassword() { | ||
return ( | ||
<div> | ||
<p>Change Password</p> | ||
</div> | ||
); | ||
} | ||
|
||
export default ChangePassword; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function ForgotPassword() { | ||
return ( | ||
<div> | ||
<p>Forgot Password</p> | ||
</div> | ||
); | ||
} | ||
|
||
export default ForgotPassword; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export { default as SignIn } from './SignIn'; | ||
export { default as SignUp } from './SignUp'; | ||
export { default as Home } from './Home'; | ||
export { default as ChangePassword } from './ChangePassword'; | ||
export { default as ForgotPassword } from './ForgotPassword'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const Route = { | ||
Home: '/', | ||
SignIn: 'signin', | ||
SignUp: 'signup', | ||
ChangePassword: 'change-password', | ||
ForgotPassword: 'forgot-password', | ||
}; | ||
|
||
export default Route; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const FlexCentered = styled.div` | ||
height: 100%; | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { createGlobalStyle } from 'styled-components'; | ||
|
||
const GlobalStyles = createGlobalStyle` | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
width: 100vw; | ||
height: 100vh; | ||
} | ||
*, | ||
*::before, | ||
*::after { | ||
box-sizing: border-box; | ||
} | ||
body * { | ||
font-family: 'Rubik', sans-serif !important; | ||
} | ||
`; | ||
|
||
export default GlobalStyles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import { defineConfig } from 'vite'; | ||
import tsconfigPaths from 'vite-tsconfig-paths'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react()], | ||
plugins: [react(), tsconfigPaths()], | ||
base: '/MangaHub/', | ||
}); |
Oops, something went wrong.