Skip to content

Commit

Permalink
Merge branch 'master' into ThewBear-20366
Browse files Browse the repository at this point in the history
  • Loading branch information
ThewBear authored Jan 8, 2020
2 parents e6d6d76 + 197f3d1 commit e13a313
Show file tree
Hide file tree
Showing 286 changed files with 9,086 additions and 957 deletions.
25 changes: 25 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

**/coverage/**
**/node_modules/**
bin/
packages/*/dist/**
packages/*/lib/**
packages/*/scripts/**
**/dist/*
**/__testfixtures__/**
**/__tests__/fixtures/**
peril
docs
plop-templates
starters
www
benchmarks
e2e-tests
examples
integration-tests
**/*.d.ts

packages/*/*.js
packages/gatsby-plugin-preload-fonts/prepare/*.js
packages/gatsby-image/withIEPolyfill/index.js
packages/gatsby/cache-dir/commonjs/**/*
142 changes: 142 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
const TSEslint = require("@typescript-eslint/eslint-plugin")

module.exports = {
parser: "babel-eslint",
extends: [
"google",
"eslint:recommended",
"plugin:flowtype/recommended",
"plugin:react/recommended",
"prettier",
"prettier/flowtype",
"prettier/react",
],
plugins: ["flowtype", "prettier", "react", "filenames"],
parserOptions: {
ecmaVersion: 2016,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
es6: true,
node: true,
jest: true,
},
globals: {
before: true,
after: true,
spyOn: true,
__PATH_PREFIX__: true,
__BASE_PATH__: true,
__ASSET_PREFIX__: true,
},
rules: {
"arrow-body-style": [
"error",
"as-needed",
{ requireReturnForObjectLiteral: true },
],
"no-unused-expressions": [
"error",
{
allowTaggedTemplates: true,
},
],
"consistent-return": ["error"],
"filenames/match-regex": ["error", "^[a-z-\\d\\.]+$", true],
"no-console": "off",
"no-inner-declarations": "off",
"prettier/prettier": "error",
quotes: ["error", "backtick"],
"react/display-name": "off",
"react/jsx-key": "warn",
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"require-jsdoc": "off",
"valid-jsdoc": "off",
},
overrides: [
{
files: [
"packages/**/gatsby-browser.js",
"packages/gatsby/cache-dir/**/*",
],
env: {
browser: true,
},
globals: {
___loader: false,
___emitter: false,
},
},
{
files: ["**/cypress/integration/**/*", "**/cypress/support/**/*"],
globals: {
cy: false,
Cypress: false,
},
},
{
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint/eslint-plugin"],
rules: {
...TSEslint.configs.recommended.rules,
// 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/member-delimiter-style": [
"error",
{
multiline: {
delimiter: "none",
},
},
],
// This ensures all interfaces are named with an I as a prefix
// e.g.,
// interface IFoo {}
"@typescript-eslint/interface-name-prefix": [
"error",
{ prefixWithI: "always" },
],
"@typescript-eslint/no-empty-function": "off",
// This ensures that we always type the return type of functions
// a high level focus of our TS setup is typing fn inputs and outputs.
"@typescript-eslint/explicit-function-return-type": "error",
// This forces us to use interfaces over types aliases for object defintions.
// Type is still useful for opaque types
// e.g.,
// type UUID = string
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface",
],

// Allows us to write unions like `type Foo = "baz" | "bar"`
// otherwise eslint will want to switch the strings to backticks,
// which then crashes the ts compiler
quotes: "off",
"@typescript-eslint/quotes": [
2,
"backtick",
{
avoidEscape: true,
},
],
},
},
],
settings: {
react: {
version: "16.4.2",
},
},
}
86 changes: 0 additions & 86 deletions .eslintrc.json

This file was deleted.

2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Bug Report 🐞
about: Something isn't working as expected? Here is the right place to report.
---

<!-- Gatsby OSS team is on holiday, expect a delayed response -->

<!--
Please fill out each section below, otherwise, your issue will be closed. This info allows Gatsby maintainers to diagnose (and fix!) your issue as quickly as possible.
Expand Down
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Gatsby Documentation
url: https://www.gatsbyjs.org/docs/
about: Check out the Gatsby documentation for answers to common questions
- name: Gatsby Discord
url: http://gatsby.dev/discord
about: Ask questions, get help and discuss new things you're building with the Gatsby community
- name: AskGatsbyJS Twitter
url: https://twitter.com/AskGatsbyJS
about: The official Twitter account to ask questions and get help with Gatsby
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Documentation 📝
about: Suggest better docs coverage for a particular tool or process.
---

<!-- Gatsby OSS team is on holiday, expect a delayed response -->

<!--
To make it easier for us to help you, please include as much useful information as possible.
Expand Down
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Feature Request 💡
about: Suggest a new idea for the project.
---

<!-- Gatsby OSS team is on holiday, expect a delayed response -->

<!--
Please fill out each section below, otherwise, your issue will be closed.
Expand Down
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/new_translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: New Translation Request 🌐
about: Suggest a new language translation of the repo.
---

<!-- Gatsby OSS team is on holiday, expect a delayed response -->

<!--
Please fill out the YAML form below, otherwise, your issue will be closed.
Expand Down
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Question 🤔
about: Usage question or discussion about Gatsby.
---

<!-- Gatsby OSS team is on holiday, expect a delayed response -->

<!--
To make it easier for us to help you, please include as much useful information as possible.
Expand Down
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<!-- Gatsby OSS team is on holiday, expect a delayed response -->

<!--
Have any questions? Check out the contributing docs at https://gatsby.dev/contribute, or
ask in this Pull Request and a Gatsby maintainer will be happy to help :)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ node_modules/

# misc
.serverless/
.eslintcache

# lock files
yarn.lock
Expand Down
14 changes: 0 additions & 14 deletions benchmarks/markdown/README.md

This file was deleted.

Loading

0 comments on commit e13a313

Please sign in to comment.