Skip to content

Commit 72ed922

Browse files
committed
💡 chore: upgrade the esling config
1 parent a6ac9f4 commit 72ed922

10 files changed

Lines changed: 33 additions & 31 deletions

File tree

.eslintrc.json

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"extends": [
77
"plugin:react/recommended",
88
"airbnb",
9-
"plugin:prettier/recommended",
10-
"plugin:@typescript-eslint/eslint-recommended",
11-
"plugin:@typescript-eslint/recommended"
9+
"plugin:@typescript-eslint/recommended",
10+
"prettier/@typescript-eslint",
11+
"plugin:prettier/recommended"
1212
],
1313
"globals": {
1414
"Atomics": "readonly",
@@ -19,12 +19,8 @@
1919
"ecmaFeatures": {
2020
"jsx": true
2121
},
22-
"ecmaVersion": 2018,
23-
"sourceType": "module",
24-
"project": "./tsconfig.json",
25-
26-
"allowImportExportEverywhere": true,
27-
"tsconfigRootDir": "."
22+
"ecmaVersion": 11,
23+
"sourceType": "module"
2824
},
2925
"plugins": [
3026
"react",
@@ -36,24 +32,30 @@
3632
"rules": {
3733
"prettier/prettier": "error",
3834

35+
"class-methods-use-this": "off",
36+
"@typescript-eslint/explicit-module-boundary-types": "off",
37+
"@typescript-eslint/explicit-function-return-type": [
38+
"error",
39+
{
40+
"allowExpressions": true
41+
}
42+
],
43+
3944
"react-hooks/rules-of-hooks": "error",
4045
"react-hooks/exhaustive-deps": "warn",
4146

4247
"react/prop-types": "off",
4348
"react/jsx-props-no-spreading": "off",
44-
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
45-
46-
"no-unused-expressions": "off",
47-
48-
"@typescript-eslint/camelcase": "off",
49-
"@typescript-eslint/explicit-function-return-type": [
49+
"react/jsx-filename-extension": [
5050
"error",
5151
{
52-
"allowExpressions": true
52+
"extensions": [".tsx"]
5353
}
5454
],
5555

56+
"no-unused-expressions": "off",
5657
"import/prefer-default-export": "off",
58+
"import/no-duplicates": "off",
5759
"import/extensions": [
5860
"error",
5961
"ignorePackages",
@@ -70,20 +72,20 @@
7072
"groups": [
7173
"/^(react|styled-components)/",
7274
"module",
73-
["/^~/components/", "/^~/Layout/"],
74-
"/^~/hooks/",
75-
"/^~/contexts/",
75+
"/^.*components/",
76+
"/^.*Layout/",
77+
"/^.*hooks/",
78+
"/^.*pages/",
79+
"/^.*service/",
7680
["parent", "sibling", "index"],
77-
"/^~/assets/",
78-
"/^(~|.)/styles/"
81+
"/^.*assets/",
82+
"/^.*styles/"
7983
],
8084
"alphabetize": { "order": "asc", "ignoreCase": true }
8185
}
8286
]
8387
},
8488
"settings": {
85-
"import/extensions": ["js", "jsx", ".ts", ".tsx"],
86-
8789
"import/resolver": {
8890
"typescript": {}
8991
}

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @henry-ns

src/components/Fighter/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { FaPlus, FaCheck } from 'react-icons/fa';
44
import { PullRequest, useRepository } from '~/hooks/repository';
55

66
import { SearchButton } from '../SearchRepository/styles';
7-
87
import { Container } from './styles';
98

109
interface Props {

src/components/SEO.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ interface SiteMetaData {
99
description: string;
1010
title: string;
1111
author: string;
12-
}
13-
}
12+
};
13+
};
1414
}
1515

1616
interface SEOProps {

src/components/SearchRepository/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const SearchRepository: React.FC<Props> = ({ setDisabled }) => {
5555
setPullCount,
5656
} = useRepository();
5757

58-
const [getRepository, { data, loading, error }] = useLazyQuery<QueryData, {}>(
58+
const [getRepository, { data, loading, error }] = useLazyQuery<QueryData>(
5959
QUERY,
6060
{
6161
variables: {

src/pages/battlefield/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useState } from 'react';
22

33
import Button from '~/components/Button';
4+
import Layout from '~/components/Layout';
45
import SearchRepository from '~/components/SearchRepository';
5-
import Layout from '~/Layout';
66

77
import { Container } from './styles';
88
import { ButtonGroup } from '~/styles/button';

src/pages/fighters/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import gql from 'graphql-tag';
55

66
import Button from '~/components/Button';
77
import Fighter from '~/components/Fighter';
8-
import Layout from '~/Layout';
8+
import Layout from '~/components/Layout';
99

1010
import { PullRequest, useRepository } from '~/hooks/repository';
1111

src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

3+
import Layout from '~/components/Layout';
34
import Home from '~/components/sections/Home';
4-
import Layout from '~/Layout';
55

66
const IndexPage: React.FC = () => (
77
<Layout title="Home">

src/pages/result/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
import Button from '~/components/Button';
4-
import Layout from '~/Layout';
4+
import Layout from '~/components/Layout';
55

66
import { useRepository } from '~/hooks/repository';
77

0 commit comments

Comments
 (0)