chore (lint): update eslint config

This commit is contained in:
MedzikUser 2022-05-10 16:57:29 +02:00
parent 72ccf56a90
commit 6f332499de
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
9 changed files with 82 additions and 14 deletions

View File

@ -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"
]
}
}

View File

@ -1,8 +1,7 @@
import { faM, faMoon, faSun } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { RocketLaunch } from "@mui/icons-material";
import { AppBar, IconButton, Link, Stack, Toolbar, Typography } from "@mui/material";
import { useState } from "react";
import { faMoon, faSun } from "@fortawesome/free-solid-svg-icons"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { RocketLaunch } from "@mui/icons-material"
import { AppBar, IconButton, Link, Stack, Toolbar, Typography } from "@mui/material"
export default function Footer({ toggleTheme, theme}: Props) {
return (

View File

@ -1,9 +1,6 @@
import { Button } from '@mui/material'
import Head from 'next/head'
import { useCookies } from 'react-cookie'
import styled from 'styled-components'
import { links } from '../config'
import ThemeInterface from '../types/theme'
const Title = styled.h1`
margin: 0;
@ -48,7 +45,7 @@ export default function NotFound() {
</Head>
<Title>
404 | This page could not be found.
404 | Server-side error occurred
</Title>
<StyledButton href="/">

56
website/pages/500.tsx Normal file
View File

@ -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>
</>
)
}

View File

@ -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 { useCookies } from 'react-cookie'
import { createGlobalStyle, ThemeProvider } from 'styled-components'

View File

@ -3,7 +3,6 @@ import { useEffect, useState } from 'react'
import { useCookies } from 'react-cookie'
import styled from 'styled-components'
import { links } from '../config'
import ThemeInterface from '../types/theme'
const Title = styled.h1`
margin: 0;

View File

@ -1,3 +1,4 @@
import React from 'react'
import { Button, TextField } from '@mui/material'
import Head from 'next/head'
import Router from 'next/router'

View File

@ -131,5 +131,6 @@ type Props = {
path: string,
size: string,
modified: string,
refresh: (path: string) => any
// eslint-disable-next-line no-unused-vars
refresh: (path: string) => void
}

View File

@ -15,6 +15,6 @@
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "pages/404.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}