-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 43ad8fd
Showing
57 changed files
with
12,399 additions
and
0 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,4 @@ | ||
node_modules/ | ||
coverage/ | ||
dist/ | ||
src/generated/ |
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,55 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"airbnb-base", | ||
"plugin:jest-formatting/strict", | ||
"plugin:jest/recommended", | ||
"plugin:jest/style", | ||
"plugin:prettier/recommended" | ||
], | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"jest", | ||
"jest-formatting", | ||
"json" | ||
], | ||
"env": { | ||
"node": true, | ||
"jest/globals": true | ||
}, | ||
"globals": { | ||
"PromiseFulfilledResult": "readonly" | ||
}, | ||
"settings": { | ||
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] }, | ||
"import/resolver": { "typescript": {} } | ||
}, | ||
"rules": { | ||
"import/prefer-default-export": "off", | ||
"import/no-extraneous-dependencies": "off", | ||
"import/extensions": "off", | ||
"global-require": "off", | ||
"import/no-dynamic-require": "off", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": ["error"], | ||
"@typescript-eslint/no-non-null-assertion": "error", | ||
"class-methods-use-this": "off", | ||
"indent": "off", | ||
"max-classes-per-file": "off", | ||
"no-underscore-dangle": "off", | ||
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": ["error"], | ||
"no-console": "off", | ||
"no-param-reassign": "off", | ||
"consistent-return": "off", | ||
"padding-line-between-statements": [ | ||
"error", | ||
{ "blankLine": "always", "prev": ["*"], "next": ["block-like", "return", "class"] }, | ||
{ "blankLine": "always", "prev": ["block-like", "return", "class"], "next": ["*"] } | ||
], | ||
"jest/consistent-test-it": ["error", { "fn": "it" }], | ||
"jest/prefer-lowercase-title": ["error", { "ignore": ["describe"] }], | ||
"jest/require-top-level-describe": "error", | ||
"jest/no-standalone-expect": "off" | ||
} | ||
} |
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,27 @@ | ||
name: Install | ||
inputs: | ||
NPM_TOKEN: | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup .npmrc | ||
shell: bash | ||
run: echo "//registry.npmjs.org/:_authToken=${{ inputs.NPM_TOKEN }}" >> .npmrc | ||
- name: Get yarn cache directory path | ||
shell: bash | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Restore node modules cache | ||
uses: actions/cache@v3 | ||
id: node-modules-cache | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-nodemodules-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-nodemodules- | ||
- name: Install | ||
shell: bash | ||
if: steps.node-modules-cache.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile --non-interactive |
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,18 @@ | ||
version: 2 | ||
registries: | ||
npm-npmjs: | ||
type: npm-registry | ||
url: https://registry.npmjs.org | ||
token: ${{ secrets.NPM_TOKEN }} | ||
updates: | ||
- package-ecosystem: npm | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
allow: | ||
- dependency-type: direct | ||
|
||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: monthly |
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,22 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yml | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
dependabot: | ||
uses: ./.github/workflows/dependabot-auto-merge.yml | ||
needs: test | ||
secrets: | ||
GH_TOKEN: "${{ secrets.GH_DEPENDABOT_TOKEN || secrets.GH_DEPLOY_TOKEN }}" |
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,41 @@ | ||
name: Dependabot Auto-Merge | ||
on: | ||
workflow_call: | ||
secrets: | ||
GH_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Fetch Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1 | ||
with: | ||
github-token: "${{ secrets.GH_TOKEN }}" | ||
- name: Determine auto-mergeability | ||
id: auto | ||
run: echo "enabled=${{steps.metadata.outputs.dependency-type == 'direct:development' && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')}}" >> $GITHUB_OUTPUT | ||
- name: Enable auto-merge for patches | ||
if: steps.auto.outputs.enabled == 'true' | ||
run: gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GH_TOKEN}} | ||
- name: Approve the PR | ||
if: steps.auto.outputs.enabled == 'true' | ||
run: | | ||
gh pr checkout "$PR_URL" | ||
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; | ||
then | ||
gh pr review --approve "$PR_URL" | ||
else | ||
echo "PR already approved."; | ||
fi | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GH_TOKEN}} |
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,33 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- canary/* | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yml | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Install | ||
run: yarn install --frozen-lockfile --non-interactive | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: yarn run semantic-release |
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,27 @@ | ||
on: | ||
workflow_call: | ||
secrets: | ||
NPM_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Lint | ||
run: yarn lint | ||
- name: Check types | ||
run: yarn typecheck | ||
- name: Restore Jest cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: .jest-cache | ||
key: ${{ runner.os }}-jest | ||
- name: Test | ||
run: yarn 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Packages | ||
.yalc | ||
yalc.lock | ||
node_modules/ | ||
|
||
# Build | ||
dist/ | ||
*.tsbuildinfo | ||
|
||
# Logs | ||
*.log | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# IDE | ||
.idea/ | ||
|
||
# Tests | ||
coverage/ | ||
.jest/ | ||
spec.json | ||
|
||
# Vi | ||
*.swp | ||
|
||
# Generated client code | ||
src/generated/ |
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,5 @@ | ||
module.exports = { | ||
jsxBracketSameLine: true, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
}; |
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,7 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"davidanson.vscode-markdownlint" | ||
] | ||
} |
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,21 @@ | ||
{ | ||
"typescript.preferences.importModuleSpecifier": "relative", | ||
"files.trimFinalNewlines": true, | ||
"files.trimTrailingWhitespace": true, | ||
"files.insertFinalNewline": true, | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.fixAll.markdownlint": "explicit" | ||
}, | ||
"[prisma]": { | ||
"editor.defaultFormatter": "Prisma.prisma", | ||
"editor.formatOnSave": true | ||
}, | ||
"editor.rulers": [80], | ||
"eslint.validate": [ | ||
"javascript", | ||
"typescript" | ||
], | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
} |
Oops, something went wrong.