Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from gatsbyjs:master #415

Merged
merged 6 commits into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
59 changes: 50 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ module.exports = {
...TSEslint.configs.recommended.rules,
// We should absolutely avoid using ts-ignore, but it's not always possible.
// particular when a dependencies types are incorrect.
"@typescript-eslint/ban-ts-comment": {
"ts-ignore": "allow-with-description",
},
"@typescript-eslint/ban-ts-comment": [
"warn",
{ "ts-ignore": "allow-with-description" }
],
// This rule is great. It helps us not throw on types for areas that are
// easily inferrable. However we have a desire to have all function inputs
// and outputs declaratively typed. So this let's us ignore the parameters
Expand All @@ -125,22 +126,62 @@ module.exports = {
},
},
],
"camelcase": "off",
// TODO: These rules allow a lot of stuff and don't really enforce. If we want to apply our styleguide, we'd need to fix a lot of stuff
"@typescript-eslint/naming-convention": [
"error",
{
selector: "default",
format: ["camelCase"],
},
{ selector: "variable", format: ["camelCase", "UPPER_CASE"] },
{
selector: "parameter",
format: ["camelCase"],
selector: "variable",
format: ["camelCase", "UPPER_CASE", "PascalCase"],
leadingUnderscore: "allowSingleOrDouble",
trailingUnderscore: "allowSingleOrDouble",
},
{
selector: "function",
format: ["camelCase", "PascalCase"],
leadingUnderscore: "allow",
prefix: ["unstable_", ""],
},
{
selector: "parameter",
format: ["camelCase", "PascalCase", "snake_case"],
leadingUnderscore: "allowSingleOrDouble",
},
{
selector: "enumMember",
format: ["camelCase", "UPPER_CASE", "PascalCase"]
},
{
selector: "typeLike",
format: ["PascalCase"],
},
{
selector: "typeAlias",
format: ["camelCase", "PascalCase"]
},
{
selector: "property",
format: ["PascalCase", "UPPER_CASE", "camelCase", "snake_case"],
leadingUnderscore: "allowSingleOrDouble",
},
{
selector: "objectLiteralProperty",
format: ["PascalCase", "UPPER_CASE", "camelCase", "snake_case"],
leadingUnderscore: "allowSingleOrDouble",
trailingUnderscore: "allowSingleOrDouble",
},
{
selector: "enum",
format: ["PascalCase", "UPPER_CASE"]
},
{
selector: "method",
format: ["PascalCase", "camelCase"],
leadingUnderscore: "allowSingleOrDouble",
},
{
selector: "interface",
format: ["PascalCase"],
Expand All @@ -153,14 +194,14 @@ module.exports = {
// mocking. At this point it's easier to have it off and just encourage
// using top-level imports via code reviews.
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-extra-semi": "off",
// This rule ensures that typescript types do not have semicolons
// at the end of their lines, since our prettier setup is to have no semicolons
// e.g.,
// interface Foo {
// - baz: string;
// + baz: string
// }
"@typescript-eslint/no-extra-semi": false,
"@typescript-eslint/member-delimiter-style": [
"error",
{
Expand Down Expand Up @@ -205,7 +246,7 @@ module.exports = {
],
settings: {
react: {
version: "16.4.2",
version: "16.9.0",
},
},
}
6 changes: 3 additions & 3 deletions benchmarks/source-agilitycms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"gatsby-source-filesystem": "^2.2.1",
"gatsby-transformer-sharp": "^2.4.1",
"node-fetch": "^2.6.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-helmet": "^5.2.1",
"truncate-html": "^1.0.2"
},
Expand All @@ -43,4 +43,4 @@
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
}
}
}
24 changes: 12 additions & 12 deletions docs/tutorial/building-a-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ You should now see the following dependencies in your `site/package.json`:
"dependencies": {
"gatsby": "^2.9.11",
"gatsby-theme-events": "*",
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react": "^17.0.0",
"react-dom": "^17.0.0"
}
}
```
Expand Down Expand Up @@ -155,14 +155,14 @@ The `gatsby-theme-events/package.json` file should now include the following:
```json:title=gatsby-theme-events/package.json
{
"peerDependencies": {
"gatsby": "^2.9.11",
"react": "^16.8.6",
"react-dom": "^16.8.6"
"gatsby": "^3.0.0",
"react": "^16.9.0 || ^17.0.0",
"react-dom": "^16.9.0 || ^17.0.0"
},
"devDependencies": {
"gatsby": "^2.9.11",
"react": "^16.8.6",
"react-dom": "^16.8.6"
"gatsby": "^3.0.0",
"react": "^16.9.0",
"react-dom": "^16.9.0"
}
}
```
Expand Down Expand Up @@ -1335,13 +1335,13 @@ It's important to namespace your theme. It helps differentiate between published
},
"peerDependencies": {
"gatsby": "^2.13.19",
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react": "^16.9.0 || ^17.0.0",
"react-dom": "^16.9.0 || ^17.0.0"
},
"devDependencies": {
"gatsby": "^2.13.19",
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react": "^16.9.0",
"react-dom": "^16.9.0"
},
"dependencies": {
"@emotion/react": "^11.0.0",
Expand Down
6 changes: 3 additions & 3 deletions e2e-tests/gatsby-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"gatsby-plugin-sharp": "^2.0.20",
"gatsby-source-filesystem": "^2.0.20",
"gatsby-transformer-sharp": "^2.1.13",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-helmet": "^5.2.0"
},
"keywords": [
Expand Down Expand Up @@ -42,4 +42,4 @@
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
}
}
}
6 changes: 3 additions & 3 deletions e2e-tests/gatsby-static-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"gatsby": "^2.0.118",
"gatsby-plugin-image": "^0.0.2",
"gatsby-plugin-sharp": "^2.0.20",
"react": "^16.8.0",
"react-dom": "^16.8.0"
"react": "^16.9.0",
"react-dom": "^16.9.0"
},
"keywords": [
"gatsby"
Expand All @@ -36,4 +36,4 @@
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
}
}
}
6 changes: 3 additions & 3 deletions e2e-tests/mdx-less-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"gatsby": "^2.0.118",
"gatsby-plugin-mdx": "^1.2.19",
"gatsby-source-filesystem": "^2.3.14",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"theme-ui": "^0.3.1"
},
"keywords": [
Expand All @@ -34,4 +34,4 @@
"prettier": "2.0.4",
"start-server-and-test": "^1.7.1"
}
}
}
6 changes: 3 additions & 3 deletions e2e-tests/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"gatsby": "^2.0.118",
"gatsby-plugin-mdx": "^1.2.19",
"gatsby-source-filesystem": "^2.3.14",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"theme-ui": "^0.3.1"
},
"keywords": [
Expand All @@ -34,4 +34,4 @@
"prettier": "2.0.4",
"start-server-and-test": "^1.7.1"
}
}
}
6 changes: 3 additions & 3 deletions e2e-tests/path-prefix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"gatsby-plugin-sitemap": "^2.0.12",
"gatsby-source-filesystem": "^2.8.1",
"gatsby-transformer-sharp": "^2.9.0",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-helmet": "^5.2.0"
},
"keywords": [
Expand Down Expand Up @@ -53,4 +53,4 @@
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
}
}
}
6 changes: 3 additions & 3 deletions e2e-tests/production-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"gatsby-plugin-sharp": "^3.0.0-next.5",
"gatsby-seo": "^0.1.0",
"glob": "^7.1.3",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-helmet": "^5.2.0",
"typeface-merriweather": "^1.1.13"
},
Expand Down Expand Up @@ -52,4 +52,4 @@
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
}
}
}
6 changes: 3 additions & 3 deletions e2e-tests/themes/development-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"dependencies": {
"gatsby": "^2.13.14",
"gatsby-theme-about": "*",
"react": "^16.8.0",
"react-dom": "^16.8.0"
"react": "^16.9.0",
"react-dom": "^16.9.0"
},
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -36,4 +36,4 @@
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
}
}
}
4 changes: 2 additions & 2 deletions e2e-tests/themes/gatsby-theme-about/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"prettier": "2.0.4"
},
"peerDependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react": "^16.9.0 || ^17.0.0",
"react-dom": "^16.9.0 || ^17.0.0"
}
}
6 changes: 3 additions & 3 deletions e2e-tests/themes/production-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"dependencies": {
"gatsby": "^2.13.14",
"gatsby-theme-about": "*",
"react": "^16.8.0",
"react-dom": "^16.8.0"
"react": "^16.9.0",
"react-dom": "^16.9.0"
},
"license": "MIT",
"scripts": {
Expand All @@ -33,4 +33,4 @@
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
}
}
}
6 changes: 3 additions & 3 deletions e2e-tests/visual-regression/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"gatsby-plugin-sharp": "^2.0.20",
"gatsby-source-filesystem": "^2.3.35",
"gatsby-transformer-sharp": "^2.5.19",
"react": "^16.8.0",
"react-dom": "^16.8.0"
"react": "^16.9.0",
"react-dom": "^16.9.0"
},
"keywords": [
"gatsby"
Expand Down Expand Up @@ -42,4 +42,4 @@
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
}
}
}
6 changes: 3 additions & 3 deletions examples/client-only-paths/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"gatsby": "next",
"gatsby-plugin-netlify": "next",
"gatsby-plugin-typography": "next",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-transition-group": "^2.9.0",
"react-typography": "^0.16.19",
"typography": "^0.16.19",
Expand All @@ -25,4 +25,4 @@
"build": "gatsby build",
"start": "npm run develop"
}
}
}
6 changes: 3 additions & 3 deletions examples/feed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"gatsby-plugin-feed": "next",
"gatsby-source-filesystem": "next",
"gatsby-transformer-remark": "next",
"react": "^16.4.1",
"react-dom": "^16.4.1"
"react": "^16.9.0",
"react-dom": "^16.9.0"
},
"keywords": [
"gatsby"
Expand All @@ -22,4 +22,4 @@
"build": "gatsby build",
"start": "npm run develop"
}
}
}
6 changes: 3 additions & 3 deletions examples/gatsbygram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"mousetrap": "^1.6.5",
"progress": "^2.0.3",
"prop-types": "^15.7.2",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-gravatar": "^2.6.3",
"react-icons": "^2.2.7",
"react-modal": "^3.11.2",
Expand Down Expand Up @@ -57,4 +57,4 @@
"gatsby-cypress": "^0.4.10",
"start-server-and-test": "^1.11.3"
}
}
}
Loading