Skip to content

Commit

Permalink
Update config: remove prettier, add eslint, tsconfig, update gatsby c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
Rick Kleinhans authored and Rick Kleinhans committed Apr 5, 2020
1 parent c889b54 commit 620d4b3
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 28 deletions.
34 changes: 34 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},
extends: [
'plugin:react/recommended',
'airbnb-typescript',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
plugins: [
'react',
'@typescript-eslint',
'react-hooks',
],
settings: {
react: {
version: 'detect',
},
},
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
};
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ typings/
# Optional REPL history
.node_repl_history

# Firebase cache directory
.firebase

# Output of 'npm pack'
*.tgz

# dotenv environment variable files
.env*
.firebaserc

# gatsby files
.cache/
Expand Down
4 changes: 0 additions & 4 deletions .prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

35 changes: 18 additions & 17 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
module.exports = {
siteMetadata: {
title: `Gatsby Default Starter`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
author: `@gatsbyjs`,
title: 'Corona',
description: 'A simple tool to track global progress in defeating Covid-19.',
author: '@rickkln',
},
plugins: [
`gatsby-plugin-react-helmet`,
'gatsby-plugin-react-helmet',
{
resolve: `gatsby-source-filesystem`,
resolve: 'gatsby-source-filesystem',
options: {
name: `images`,
name: 'images',
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
{
resolve: `gatsby-plugin-manifest`,
resolve: 'gatsby-plugin-manifest',
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#663399`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
name: 'Corona',
short_name: 'corona',
start_url: '/',
background_color: '#202124',
theme_color: '#202124',
display: 'browser',
icon: 'src/images/logo-icon.png', // This path is relative to the root of the site.
},
},
'gatsby-plugin-typescript',
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}
};
Binary file added src/images/logo-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"ecmaFeatures": {
"jsx": true,
},
"ecmaVersion": 2018,
"sourceType": "module",
"compilerOptions": {
"module": "commonjs",
"target": "esnext",
"jsx": "preserve",
"lib": [
"dom",
"esnext",
],
"strict": true,
"noEmit": true,
"isolatedModules": true,
"esModuleInterop": true,
"noUnusedLocals": false,
"noImplicitAny": true
},
"exclude": [
"node_modules",
"public",
".cache",
]
}

0 comments on commit 620d4b3

Please sign in to comment.