-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ThewBear-20366
- Loading branch information
Showing
286 changed files
with
9,086 additions
and
957 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
}, | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ node_modules/ | |
|
||
# misc | ||
.serverless/ | ||
.eslintcache | ||
|
||
# lock files | ||
yarn.lock | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.