chore (lint): update eslint config
This commit is contained in:
parent
72ccf56a90
commit
6f332499de
|
@ -1,3 +1,18 @@
|
||||||
{
|
{
|
||||||
"extends": "next/core-web-vitals"
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"next/core-web-vitals"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"semi": [
|
||||||
|
"warn",
|
||||||
|
"never"
|
||||||
|
],
|
||||||
|
"no-unused-vars": [
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"no-unused-expressions": [
|
||||||
|
"warn"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { faM, faMoon, faSun } from "@fortawesome/free-solid-svg-icons";
|
import { faMoon, faSun } from "@fortawesome/free-solid-svg-icons"
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
||||||
import { RocketLaunch } from "@mui/icons-material";
|
import { RocketLaunch } from "@mui/icons-material"
|
||||||
import { AppBar, IconButton, Link, Stack, Toolbar, Typography } from "@mui/material";
|
import { AppBar, IconButton, Link, Stack, Toolbar, Typography } from "@mui/material"
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export default function Footer({ toggleTheme, theme}: Props) {
|
export default function Footer({ toggleTheme, theme}: Props) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
import { Button } from '@mui/material'
|
import { Button } from '@mui/material'
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import { useCookies } from 'react-cookie'
|
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { links } from '../config'
|
|
||||||
import ThemeInterface from '../types/theme'
|
|
||||||
|
|
||||||
const Title = styled.h1`
|
const Title = styled.h1`
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -48,7 +45,7 @@ export default function NotFound() {
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<Title>
|
<Title>
|
||||||
404 | This page could not be found.
|
404 | Server-side error occurred
|
||||||
</Title>
|
</Title>
|
||||||
|
|
||||||
<StyledButton href="/">
|
<StyledButton href="/">
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
import { Button } from '@mui/material'
|
||||||
|
import Head from 'next/head'
|
||||||
|
import styled from 'styled-components'
|
||||||
|
|
||||||
|
const Title = styled.h1`
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.15;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: ${({ theme }) => theme.pages.index.title.a};
|
||||||
|
text-decoration: none;
|
||||||
|
animation: animate 1.5s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes animate {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover,
|
||||||
|
a:focus,
|
||||||
|
a:active {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
|
const StyledButton = styled(Button)`
|
||||||
|
margin-top: 1rem;
|
||||||
|
`
|
||||||
|
|
||||||
|
export default function NotFound() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<title>404 - HomeDisk</title>
|
||||||
|
</Head>
|
||||||
|
|
||||||
|
<Title>
|
||||||
|
404 | This page could not be found
|
||||||
|
</Title>
|
||||||
|
|
||||||
|
<StyledButton href="/">
|
||||||
|
Go to Home Page
|
||||||
|
</StyledButton>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
import { Button, ThemeProvider as MuiThemeProvider, createTheme as muiCreateTheme, PaletteMode } from '@mui/material'
|
import { ThemeProvider as MuiThemeProvider, createTheme as muiCreateTheme, PaletteMode } from '@mui/material'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useCookies } from 'react-cookie'
|
import { useCookies } from 'react-cookie'
|
||||||
import { createGlobalStyle, ThemeProvider } from 'styled-components'
|
import { createGlobalStyle, ThemeProvider } from 'styled-components'
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { useEffect, useState } from 'react'
|
||||||
import { useCookies } from 'react-cookie'
|
import { useCookies } from 'react-cookie'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import { links } from '../config'
|
import { links } from '../config'
|
||||||
import ThemeInterface from '../types/theme'
|
|
||||||
|
|
||||||
const Title = styled.h1`
|
const Title = styled.h1`
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import React from 'react'
|
||||||
import { Button, TextField } from '@mui/material'
|
import { Button, TextField } from '@mui/material'
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import Router from 'next/router'
|
import Router from 'next/router'
|
||||||
|
|
|
@ -131,5 +131,6 @@ type Props = {
|
||||||
path: string,
|
path: string,
|
||||||
size: string,
|
size: string,
|
||||||
modified: string,
|
modified: string,
|
||||||
refresh: (path: string) => any
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
refresh: (path: string) => void
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,6 @@
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "preserve"
|
"jsx": "preserve"
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "pages/404.tsx"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue