Skip to content

Commit

Permalink
💡 chore: upgrade the esling config
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquepw committed Aug 23, 2020
1 parent a6ac9f4 commit 72ed922
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 31 deletions.
48 changes: 25 additions & 23 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"globals": {
"Atomics": "readonly",
Expand All @@ -19,12 +19,8 @@
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json",

"allowImportExportEverywhere": true,
"tsconfigRootDir": "."
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": [
"react",
Expand All @@ -36,24 +32,30 @@
"rules": {
"prettier/prettier": "error",

"class-methods-use-this": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],

"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",

"react/prop-types": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],

"no-unused-expressions": "off",

"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-function-return-type": [
"react/jsx-filename-extension": [
"error",
{
"allowExpressions": true
"extensions": [".tsx"]
}
],

"no-unused-expressions": "off",
"import/prefer-default-export": "off",
"import/no-duplicates": "off",
"import/extensions": [
"error",
"ignorePackages",
Expand All @@ -70,20 +72,20 @@
"groups": [
"/^(react|styled-components)/",
"module",
["/^~/components/", "/^~/Layout/"],
"/^~/hooks/",
"/^~/contexts/",
"/^.*components/",
"/^.*Layout/",
"/^.*hooks/",
"/^.*pages/",
"/^.*service/",
["parent", "sibling", "index"],
"/^~/assets/",
"/^(~|.)/styles/"
"/^.*assets/",
"/^.*styles/"
],
"alphabetize": { "order": "asc", "ignoreCase": true }
}
]
},
"settings": {
"import/extensions": ["js", "jsx", ".ts", ".tsx"],

"import/resolver": {
"typescript": {}
}
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @henry-ns
1 change: 0 additions & 1 deletion src/components/Fighter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { FaPlus, FaCheck } from 'react-icons/fa';
import { PullRequest, useRepository } from '~/hooks/repository';

import { SearchButton } from '../SearchRepository/styles';

import { Container } from './styles';

interface Props {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/components/SEO.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ interface SiteMetaData {
description: string;
title: string;
author: string;
}
}
};
};
}

interface SEOProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchRepository/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const SearchRepository: React.FC<Props> = ({ setDisabled }) => {
setPullCount,
} = useRepository();

const [getRepository, { data, loading, error }] = useLazyQuery<QueryData, {}>(
const [getRepository, { data, loading, error }] = useLazyQuery<QueryData>(
QUERY,
{
variables: {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/battlefield/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState } from 'react';

import Button from '~/components/Button';
import Layout from '~/components/Layout';
import SearchRepository from '~/components/SearchRepository';
import Layout from '~/Layout';

import { Container } from './styles';
import { ButtonGroup } from '~/styles/button';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/fighters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import gql from 'graphql-tag';

import Button from '~/components/Button';
import Fighter from '~/components/Fighter';
import Layout from '~/Layout';
import Layout from '~/components/Layout';

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

Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import Layout from '~/components/Layout';
import Home from '~/components/sections/Home';
import Layout from '~/Layout';

const IndexPage: React.FC = () => (
<Layout title="Home">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/result/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import Button from '~/components/Button';
import Layout from '~/Layout';
import Layout from '~/components/Layout';

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

Expand Down

0 comments on commit 72ed922

Please sign in to comment.