Skip to content

Commit

Permalink
Исправления eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneviktorov committed Jul 20, 2024
1 parent 4ebc5ef commit 259d3bb
Show file tree
Hide file tree
Showing 18 changed files with 354 additions and 81 deletions.
31 changes: 30 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
{
"extends": "next/core-web-vitals"
"plugins": ["react", "import"],
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],

"rules": {
"import/no-named-default": "off",
"import/no-unresolved": "error",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
["sibling", "parent"],
"index",
"unknown"
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
}
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,17 @@ These rules redirect requests to a secure connection (HTTPS), which is important
`emailjs-com`

`react-input-mask`

## Eslint commands

Error checking:

```
npm run lint
```

Error correction

```
npm run lint -- --fix
```
13 changes: 7 additions & 6 deletions app/documentation/privacy-policy/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { Metadata } from "next";
import type { Viewport } from "next";
import styles from "../Documentation.module.css";
import PageView from "@/components/PageView";
import Loading from "@/components/Loading/loading";
import type { Metadata , Viewport } from "next";

import Footer from "@/components/Footer";
import Header from "@/components/Header";
import Loading from "@/components/Loading/loading";
import PageContainer from "@/components/PageContainer";
import Footer from "@/components/Footer";
import PageView from "@/components/PageView";

import styles from "../Documentation.module.css";

export const metadata: Metadata = {
title: "ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ",
Expand Down
13 changes: 7 additions & 6 deletions app/documentation/terms-of-use/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { Metadata } from "next";
import type { Viewport } from "next";
import styles from "../Documentation.module.css";
import PageView from "@/components/PageView";
import Loading from "@/components/Loading/loading";
import type { Metadata , Viewport } from "next";

import Footer from "@/components/Footer";
import Header from "@/components/Header";
import Loading from "@/components/Loading/loading";
import PageContainer from "@/components/PageContainer";
import Footer from "@/components/Footer";
import PageView from "@/components/PageView";

import styles from "../Documentation.module.css";

export const metadata: Metadata = {
title: "ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ",
Expand Down
8 changes: 4 additions & 4 deletions app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Metadata } from "next";
import type { Viewport } from "next";
import PageView from "@/components/PageView";
import Loading from "@/components/Loading/loading";
import type { Metadata , Viewport } from "next";

import ErrorContainer from "@/components/ErrorContainer";
import Footer from "@/components/Footer";
import Loading from "@/components/Loading/loading";
import PageView from "@/components/PageView";

export const metadata: Metadata = {
title: "404",
Expand Down
12 changes: 6 additions & 6 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Metadata } from "next";
import type { Viewport } from "next";
import PageView from "@/components/PageView";
import Loading from "@/components/Loading/loading";
import Header from "@/components/Header";
import type { Metadata , Viewport } from "next";

import About from "@/chapters/About";
import { InitialPortfolio } from "@/chapters/Portfolio";
import Contacts from "@/chapters/Contacts";
import { InitialPortfolio } from "@/chapters/Portfolio";
import Footer from "@/components/Footer";
import Header from "@/components/Header";
import Loading from "@/components/Loading/loading";
import PageView from "@/components/PageView";

export const metadata: Metadata = {
title: "Викторов",
Expand Down
10 changes: 5 additions & 5 deletions app/portfolio/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Metadata } from "next";
import type { Viewport } from "next";
import PageView from "@/components/PageView";
import Loading from "@/components/Loading/loading";
import Header from "@/components/Header";
import type { Metadata , Viewport } from "next";

import { MainPortfolio } from "@/chapters/Portfolio";
import Footer from "@/components/Footer";
import Header from "@/components/Header";
import Loading from "@/components/Loading/loading";
import PageView from "@/components/PageView";

export const metadata: Metadata = {
title: "Портфолио",
Expand Down
7 changes: 5 additions & 2 deletions components/ErrorContainer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import Link from "next/link";
import Image from "next/image";
import styles from "./ErrorContainer.module.css";
import Link from "next/link";

import Logotype from "@/public/assets/icons/Logotype.svg";

import styles from "./ErrorContainer.module.css";


export default function ErrorContainer() {
return (
<div className={styles.container}>
Expand Down
1 change: 1 addition & 0 deletions components/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from "next/link";

import styles from "./Footer.module.css";

export default function Footer() {
Expand Down
1 change: 1 addition & 0 deletions components/Header/Header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
color: var(--colorDarkBlue);
text-decoration: none;
text-align: center;
text-transform: uppercase;
}

@media (max-width: 768px) {
Expand Down
3 changes: 2 additions & 1 deletion components/Header/components/ButtonNavigate/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";
import { MouseEventHandler } from "react";
import Link from "next/link";
import { MouseEventHandler } from "react";

import styles from "./ButtonNavigate.module.css";

export default function ButtonNavigate({
Expand Down
10 changes: 6 additions & 4 deletions components/Header/components/MenuRight/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { ReactNode, useEffect } from "react";
import styles from "./MenuRight.module.css";
import Link from "next/link";
import Image from "next/image";
import Logotype from "@/public/assets/icons/Logotype.svg";
import Link from "next/link";
import { ReactNode, useEffect } from "react";

import Close from "@/public/assets/icons/Close.svg";
import Logotype from "@/public/assets/icons/Logotype.svg";

import styles from "./MenuRight.module.css";

export default function MenuRight({
isOpen,
Expand Down
13 changes: 8 additions & 5 deletions components/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
"use client";
import Link from "next/link";
import Image from "next/image";
import styles from "./Header.module.css";
import Link from "next/link";
import { useRouter } from "next/navigation";
import Logotype from "@/public/assets/icons/Logotype.svg";
import Menu from "@/public/assets/icons/Menu.svg";
import { useEffect, useState } from "react";
import MenuRight from "./components/MenuRight";

import { useIsMobileQuery } from "@/hooks/useIsMobileQuery";
import Logotype from "@/public/assets/icons/Logotype.svg";
import Menu from "@/public/assets/icons/Menu.svg";

import ButtonNavigate from "./components/ButtonNavigate";
import MenuRight from "./components/MenuRight";
import styles from "./Header.module.css";


export default function Header({
main,
Expand Down
6 changes: 4 additions & 2 deletions components/Loading/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"use client";
import Image from "next/image";
import styles from "./Loading.module.css";
import Logo from "@/public/assets/icons/Icon.svg";
import { useEffect, useState } from "react";

import Logo from "@/public/assets/icons/Icon.svg";

import styles from "./Loading.module.css";

export default function Loading() {
const [loading, setLoading] = useState(false);

Expand Down
1 change: 1 addition & 0 deletions components/PageContainer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ReactNode } from "react";

import styles from "./PageContainer.module.css";

export default function PageContainer({
Expand Down
1 change: 1 addition & 0 deletions components/PageView/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ReactNode } from "react";

import styles from "./PageView.module.css";

export default function PageView({ children }: { children: ReactNode }) {
Expand Down
Loading

0 comments on commit 259d3bb

Please sign in to comment.