Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Commit b9cb564

Browse files
authored
Merge pull request #1 from erkobridee/update/gatsby
Update/gatsby v3
2 parents eaac986 + 1b51791 commit b9cb564

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+31244
-30477
lines changed

.babelrc.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
module.exports = function(api) {
2-
// Cache the returned value forever and don't call this function again.
3-
api.cache(true);
1+
module.exports = function (api) {
2+
// Cache the returned value forever and don't call this function again.
3+
api.cache(true);
44

5-
const isTranslationsFlow = Boolean(process.env.TRANSLATIONS);
6-
if (isTranslationsFlow) {
7-
return {
8-
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
9-
plugins: [
10-
'@babel/plugin-syntax-dynamic-import',
11-
[
12-
'react-intl',
13-
{
14-
messagesDir: '.build/i18nExtractedMessages/',
15-
},
16-
],
17-
],
18-
};
19-
}
5+
const isTranslationsFlow = Boolean(process.env.TRANSLATIONS);
6+
if (isTranslationsFlow) {
7+
return {
8+
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
9+
plugins: [
10+
'@babel/plugin-syntax-dynamic-import',
11+
[
12+
'react-intl',
13+
{
14+
messagesDir: '.build/i18nExtractedMessages/',
15+
},
16+
],
17+
],
18+
};
19+
}
2020

21-
return {
22-
presets: ['babel-preset-gatsby'],
23-
};
21+
return {
22+
presets: ['babel-preset-gatsby'],
23+
};
2424

25-
/*
25+
/*
2626
const presets = [];
2727
const plugins = [
2828
[

.editorconfig

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# EditorConfig is awesome: https://EditorConfig.org
2-
3-
# top-most EditorConfig file
1+
# Editor configuration, see http://editorconfig.org
42
root = true
53

6-
# Unix-style newlines with a newline ending every file
74
[*]
8-
end_of_line = lf
9-
insert_final_newline = true
5+
charset = utf-8
106
indent_style = space
117
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintrc

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

.eslintrc.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
module.exports = {
2+
root: true,
3+
// Specifies the ESLint parser
4+
parser: '@typescript-eslint/parser',
5+
extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
6+
settings: {
7+
react: {
8+
version: 'detect',
9+
},
10+
},
11+
env: {
12+
browser: true,
13+
node: true,
14+
es6: true,
15+
},
16+
plugins: ['@typescript-eslint', 'react', 'prettier'],
17+
parserOptions: {
18+
ecmaFeatures: {
19+
jsx: true,
20+
},
21+
// Allows for the parsing of modern ECMAScript features
22+
ecmaVersion: 2018,
23+
// Allows for the use of imports
24+
sourceType: 'module',
25+
},
26+
rules: {
27+
// Disable prop-types as we use TypeScript for type checking
28+
'react/prop-types': 'off',
29+
'prettier/prettier': 'error',
30+
'@typescript-eslint/explicit-function-return-type': 'off',
31+
'@typescript-eslint/explicit-module-boundary-types': 'off',
32+
'@typescript-eslint/interface-name-prefix': 'off',
33+
'@typescript-eslint/no-explicit-any': 'off',
34+
'@typescript-eslint/ban-ts-ignore': 'off',
35+
'@typescript-eslint/no-empty-interface': 'off',
36+
// needed for NextJS's jsx without react import
37+
'react/react-in-jsx-scope': 'off',
38+
},
39+
globals: { React: 'writable' },
40+
};

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ typings/
6262
!.env.example
6363

6464
# gatsby files
65-
.cache/
6665
public
66+
.cache
67+
68+
.husky
6769

6870
# Mac files
6971
.DS_Store

.prettierignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
src/assets/languages/**/*.json
1+
.cache
2+
.husky
3+
4+
package-lock.json
5+
6+
src/assets/languages/**/*.json

.prettierrc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
2-
"endOfLine": "lf",
32
"semi": true,
43
"singleQuote": true,
5-
"tabWidth": 2,
6-
"useTabs": true,
7-
"trailingComma": "es5",
8-
"printWidth": 120,
9-
"jsxBracketSameLine": false
4+
"printWidth": 120
105
}

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["EditorConfig.EditorConfig", "esbenp.prettier-vscode"]
2+
"recommendations": ["EditorConfig.EditorConfig", "esbenp.prettier-vscode"]
33
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Erko Bridee
3+
Copyright (c) 2021 Erko Bridee
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<a href="https://www.gatsbyjs.org">
3-
<img alt="Gatsby" src="https://www.gatsbyjs.org/monogram.svg" width="60" />
3+
<img alt="Gatsby" src="src/assets/images/gatsby-icon.png" width="60" />
44
</a>
55
</p>
66
<h1 align="center">

0 commit comments

Comments
 (0)