Skip to content

Commit 72246f3

Browse files
authored
Merge pull request #6 from codigofalado/development
Feature: Removing the dependabot from fighters list
2 parents e6a904b + 72ed922 commit 72246f3

File tree

28 files changed

+4380
-2191
lines changed

28 files changed

+4380
-2191
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GATSBY_GITHUB_TOKEN=

.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
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ typings/
5353

5454
# dotenv environment variable files
5555
.env*
56+
!.env.example
5657

5758
# gatsby files
5859
.cache/

CODEOWNERS

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ run `yarn start` or `npm start` command to start a local server and get a test!
9898

9999
### :package: Packages
100100
- [Apollo](https://www.apollographql.com/docs/react/)
101-
- [React Helmet Async](https://github.com/staylor/react-helmet-async)
101+
- [React Helmet](https://github.com/nfl/react-helmet)
102102
- [React Icons](https://react-icons.netlify.com/#/)
103103
- [Styled Compoments](https://www.styled-components.com/)
104104
- [Polished](https://polished.js.org/)
@@ -113,7 +113,7 @@ run `yarn start` or `npm start` command to start a local server and get a test!
113113
- [Page Creator](https://www.gatsbyjs.org/packages/gatsby-plugin-page-creator/)
114114
- [Polished](https://www.gatsbyjs.org/packages/gatsby-plugin-polished/)
115115
- [Preload Fonts](https://www.gatsbyjs.org/packages/gatsby-plugin-preload-fonts/)
116-
- [React Helmet Async](https://www.gatsbyjs.org/packages/gatsby-plugin-sharp/)
116+
- [React Helmet](https://www.gatsbyjs.org/packages/gatsby-plugin-react-helmet/)
117117
- [Sharp](https://www.gatsbyjs.org/packages/gatsby-plugin-sharp/)
118118
- [Styled Components](https://www.gatsbyjs.org/packages/gatsby-plugin-styled-components/)
119119

config/metadata.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

font-preload-cache.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":1585927005472,"hash":"53260b0eb5ca3cf626e0786300172b67","assets":{"/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true}}}
1+
{"timestamp":1598194155286,"hash":"9793e6f763870c321663cfe5f7b34b4c","assets":{"/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/dev-404-page/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/404/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/battlefield/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true,"/static/lato-latin-400-b4d2c4c39853ee244272c04999b230ba.woff2":true},"/fighters/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/result/":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true},"/404.html":{"/static/lato-latin-700-1efbd38aa76ddae2580fedf378276333.woff2":true}}}

gatsby-config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@ require('dotenv').config();
22

33
const path = require('path');
44

5-
const siteMetadata = require('./config/metadata');
5+
const siteMetadata = require('./src/assets/data/metadata.json');
66

77
module.exports = {
88
siteMetadata,
99
plugins: [
10-
'gatsby-plugin-react-helmet-async',
10+
'gatsby-plugin-react-helmet',
1111
{
1212
resolve: 'gatsby-source-filesystem',
1313
options: {
1414
name: 'images',
15-
path: `${__dirname}/src/assets`,
15+
path: `${__dirname}/src/assets/images`,
1616
},
1717
},
1818
'gatsby-transformer-sharp',
1919
'gatsby-plugin-sharp',
2020
{
2121
resolve: 'gatsby-plugin-manifest',
2222
options: {
23-
name: 'Github Fight',
23+
name: siteMetadata.title,
2424
short_name: 'Github Fight',
2525
start_url: '/',
2626
background_color: '#B23F42',
2727
theme_color: '#B23F42',
2828
display: 'minimal-ui',
29-
icon: 'src/assets/icon.png',
29+
icon: 'src/assets/images/icon.png',
3030
},
3131
},
3232
{
@@ -36,7 +36,7 @@ module.exports = {
3636
fieldName: 'github',
3737
url: 'https://api.github.com/graphql',
3838
headers: {
39-
Authorization: `token ${process.env.GITHUB_TOKEN}`,
39+
Authorization: `token ${process.env.GATSBY_GITHUB_TOKEN}`,
4040
},
4141
},
4242
},

gatsby/wrapRootElement.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
import React, { FC } from 'react';
2-
import { ApolloProvider } from 'react-apollo';
3-
import { HelmetProvider } from 'react-helmet-async';
1+
import React from 'react';
2+
import { ApolloProvider } from '@apollo/client';
43
import { ThemeProvider } from 'styled-components';
54

6-
import { client } from '../src/hooks/apollo';
5+
import apolloClient from '../src/service/apolloClient';
76
import { RepositoryProvider } from '../src/hooks/repository';
87
import theme from '../src/styles/theme';
98

109
interface Props {
1110
element: React.ReactNode;
1211
}
1312

14-
export const wrapRootElement: FC<Props> = ({ element }) => (
15-
<HelmetProvider>
16-
<ThemeProvider theme={theme}>
17-
<ApolloProvider client={client}>
18-
<RepositoryProvider>{element}</RepositoryProvider>
19-
</ApolloProvider>
20-
</ThemeProvider>
21-
</HelmetProvider>
13+
export const wrapRootElement: React.FC<Props> = ({ element }) => (
14+
<ThemeProvider theme={theme}>
15+
<ApolloProvider client={apolloClient}>
16+
<RepositoryProvider>{element}</RepositoryProvider>
17+
</ApolloProvider>
18+
</ThemeProvider>
2219
);

package.json

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,63 @@
22
"name": "github-fight",
33
"private": true,
44
"description": "A simple way to compare Github Reactions",
5-
"version": "0.1.0",
6-
"author": "Henrique M. Miranda <me@thehenry.dev>",
5+
"version": "1.0.0",
6+
"author": "Henrique Miranda <hey@thehenry.dev>",
77
"dependencies": {
8-
"@apollo/react-hooks": "^3.1.4",
9-
"apollo-boost": "^0.4.7",
8+
"@apollo/client": "^3.1.3",
109
"babel-plugin-polished": "^1.1.0",
1110
"dotenv": "^8.2.0",
12-
"gatsby": "^2.19.9",
13-
"gatsby-image": "^2.2.39",
14-
"gatsby-plugin-manifest": "^2.2.39",
15-
"gatsby-plugin-netlify": "^2.1.31",
11+
"gatsby": "^2.24.47",
12+
"gatsby-image": "^2.4.16",
13+
"gatsby-plugin-manifest": "^2.4.23",
14+
"gatsby-plugin-netlify": "^2.3.13",
1615
"gatsby-plugin-netlify-cache": "^1.2.0",
17-
"gatsby-plugin-offline": "^3.0.32",
18-
"gatsby-plugin-page-creator": "^2.1.38",
16+
"gatsby-plugin-offline": "^3.2.23",
17+
"gatsby-plugin-page-creator": "^2.3.22",
1918
"gatsby-plugin-polished": "^1.0.4",
20-
"gatsby-plugin-preload-fonts": "^1.1.1",
21-
"gatsby-plugin-react-helmet-async": "^1.0.16",
22-
"gatsby-plugin-sharp": "^2.4.3",
23-
"gatsby-plugin-styled-components": "^3.1.18",
24-
"gatsby-plugin-typescript": "^2.1.26",
25-
"gatsby-source-filesystem": "^2.1.46",
26-
"gatsby-source-graphql": "2.1.32",
27-
"gatsby-transformer-sharp": "^2.3.13",
28-
"graphql-tag": "^2.10.3",
29-
"gsap": "^3.2.6",
19+
"gatsby-plugin-preload-fonts": "^1.2.20",
20+
"gatsby-plugin-react-helmet": "^3.3.10",
21+
"gatsby-plugin-sharp": "^2.6.27",
22+
"gatsby-plugin-styled-components": "^3.3.10",
23+
"gatsby-plugin-typescript": "^2.4.18",
24+
"gatsby-source-filesystem": "^2.3.24",
25+
"gatsby-source-graphql": "2.7.1",
26+
"gatsby-transformer-sharp": "^2.5.13",
27+
"graphql-tag": "^2.11.0",
28+
"gsap": "^3.5.0",
3029
"isomorphic-fetch": "^2.2.1",
31-
"polished": "^3.5.1",
30+
"polished": "^3.6.5",
3231
"react": "^16.12.0",
33-
"react-apollo": "^3.1.4",
3432
"react-dom": "^16.12.0",
35-
"react-helmet-async": "^1.0.4",
36-
"react-icons": "^3.9.0",
37-
"styled-components": "^5.0.0",
33+
"react-helmet": "^6.1.0",
34+
"react-icons": "^3.11.0",
35+
"styled-components": "^5.1.1",
3836
"typeface-lato": "^0.0.75"
3937
},
4038
"devDependencies": {
4139
"@types/isomorphic-fetch": "^0.0.35",
42-
"@types/node": "^13.5.1",
43-
"@types/react": "^16.9.19",
44-
"@types/react-dom": "^16.9.5",
40+
"@types/node": "^14.6.0",
41+
"@types/react": "^16.9.46",
42+
"@types/react-dom": "^16.9.8",
43+
"@types/react-helmet": "^6.1.0",
4544
"@types/react-icons": "^3.0.0",
46-
"@types/styled-components": "^4.4.2",
47-
"@typescript-eslint/eslint-plugin": "^2.30.0",
48-
"@typescript-eslint/parser": "^2.30.0",
49-
"eslint": "^6.8.0",
50-
"eslint-config-airbnb": "^18.1.0",
51-
"eslint-config-prettier": "^6.10.0",
45+
"@types/styled-components": "^5.1.2",
46+
"@typescript-eslint/eslint-plugin": "^3.9.1",
47+
"@typescript-eslint/parser": "^3.9.1",
48+
"eslint": "^7.7.0",
49+
"eslint-config-airbnb": "^18.2.0",
50+
"eslint-config-prettier": "^6.11.0",
5251
"eslint-import-resolver-alias": "^1.1.2",
53-
"eslint-import-resolver-typescript": "^2.0.0",
54-
"eslint-plugin-import": "^2.20.0",
55-
"eslint-plugin-import-helpers": "^1.0.2",
56-
"eslint-plugin-jsx-a11y": "^6.2.3",
57-
"eslint-plugin-prettier": "^3.1.2",
58-
"eslint-plugin-react": "^7.19.0",
59-
"eslint-plugin-react-hooks": "^2.3.0",
52+
"eslint-import-resolver-typescript": "^2.2.1",
53+
"eslint-plugin-import": "^2.22.0",
54+
"eslint-plugin-import-helpers": "^1.1.0",
55+
"eslint-plugin-jsx-a11y": "^6.3.1",
56+
"eslint-plugin-prettier": "^3.1.4",
57+
"eslint-plugin-react": "^7.20.6",
58+
"eslint-plugin-react-hooks": "^4.1.0",
6059
"gatsby-plugin-root-import": "^2.0.5",
61-
"prettier": "^1.19.1",
62-
"typescript": "^3.7.5"
60+
"prettier": "^2.0.5",
61+
"typescript": "^4.0.2"
6362
},
6463
"keywords": [
6564
"gatsby"

0 commit comments

Comments
 (0)