This repository was archived by the owner on Jul 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
508 changed files
with
9,471 additions
and
25,706 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
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,76 @@ | ||
{ | ||
"extends": [ | ||
"airbnb-typescript", | ||
"prettier", | ||
"prettier/react", | ||
"plugin:import/errors", | ||
"plugin:import/typescript" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"plugins": ["@typescript-eslint", "import", "react", "prettier"], | ||
"rules": { | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/indent": "off", | ||
"@typescript-eslint/quotes": "off", | ||
"comma-spacing": "off", | ||
"import/no-cycle": "off", | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
"devDependencies": [ | ||
"**/stories.tsx", | ||
"**/test.ts", | ||
"**/*.test.ts", | ||
"**/test.tsx", | ||
"**/tests.tsx", | ||
"config/**/*", | ||
"*.config.js", | ||
"src/@next/pages/baseStory.ts" | ||
] | ||
} | ||
], | ||
"import/no-internal-modules": "off", | ||
"import/no-named-as-default": "off", | ||
"import/order": "error", | ||
"import/prefer-default-export": "off", | ||
"no-nested-ternary": "off", | ||
"prettier/prettier": ["error"], | ||
"react/jsx-one-expression-per-line": "off", | ||
"react/jsx-props-no-spreading": "off", | ||
"react/jsx-wrap-multilines": "off", | ||
"react/prop-types": "off", | ||
"sort-imports": "off", | ||
"no-underscore-dangle": "off", | ||
"react/state-in-constructor": "off", | ||
"react/static-property-placement": "off", | ||
|
||
"sort-keys": "off", | ||
"no-prototype-builtins": "off", | ||
"no-shadow": "off", | ||
"jsx-a11y/click-events-have-key-events": "off", | ||
"consistent-return": "off", | ||
"react/no-this-in-sfc": "off", | ||
"array-callback-return": "off", | ||
"no-plusplus": "off", | ||
"react/no-did-update-set-state": "off", | ||
"jsx-a11y/no-static-element-interactions": "off", | ||
"react/destructuring-assignment": "off", | ||
"react/button-has-type": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"no-useless-escape": "off", | ||
"jsx-a11y/no-noninteractive-element-interactions": "off", | ||
"react/no-array-index-key": "off", | ||
"no-param-reassign": "off", | ||
"no-empty-pattern": "off", | ||
"no-restricted-globals": "off", | ||
"@typescript-eslint/no-unused-vars": "off" | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"typescript": {} | ||
} | ||
} | ||
} |
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,73 @@ | ||
name: QA | ||
|
||
on: | ||
pull_request: | ||
branches: [ '*' ] | ||
|
||
jobs: | ||
|
||
check-lock: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
||
- name: Validate lock file | ||
run: | | ||
npx lockfile-lint --path package-lock.json --allowed-hosts npm yarn | ||
tsc-and-linters: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.os }}-qa-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-qa-${{ env.cache-name }}- | ||
${{ runner.os }}-qa- | ||
${{ runner.os }}- | ||
- name: Install deps | ||
run: | | ||
npm ci | ||
- name: Run tsc | ||
run: | | ||
npm run tsc | ||
- name: Run linters | ||
run: | | ||
npm run lint | ||
jest-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.os }}-qa-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-qa-${{ env.cache-name }}- | ||
${{ runner.os }}-qa- | ||
${{ runner.os }}- | ||
- name: Install deps | ||
run: | | ||
npm ci | ||
- name: Run jest | ||
run: | | ||
npm run test |
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 @@ | ||
gqlTypes |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"trailingComma": "es5" | ||
} |
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 |
---|---|---|
@@ -1,13 +1,51 @@ | ||
module.exports = { | ||
presets: [ | ||
module.exports = api => { | ||
const isExtract = api.env("extract"); | ||
const isTest = api.env("test"); | ||
const isStorybook = api.env("storybook"); | ||
|
||
const ignore = | ||
isTest || isStorybook | ||
? [] | ||
: ["**/*.test.ts", "**/*.test.tsx", "src/storybook"]; | ||
const presets = [ | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
"@babel/preset-typescript", | ||
], | ||
plugins: [ | ||
[ | ||
"@babel/preset-typescript", | ||
{ | ||
allowNamespaces: true, | ||
}, | ||
], | ||
]; | ||
const plugins = [ | ||
"@babel/plugin-syntax-dynamic-import", | ||
"transform-class-properties", | ||
"@babel/transform-runtime", | ||
"@babel/plugin-proposal-optional-chaining", | ||
], | ||
[ | ||
"react-intl-auto", | ||
{ | ||
filebase: true, | ||
includeExportName: "all", | ||
removePrefix: "src/", | ||
}, | ||
], | ||
]; | ||
if (isExtract) { | ||
plugins.push([ | ||
"react-intl", | ||
{ | ||
extractFromFormatMessageCall: true, | ||
messagesDir: "dist/locale/", | ||
}, | ||
]); | ||
} | ||
|
||
plugins.push("macros"); | ||
|
||
return { | ||
ignore, | ||
plugins, | ||
presets, | ||
}; | ||
}; |
Oops, something went wrong.