-
Notifications
You must be signed in to change notification settings - Fork 4
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
Bill Beesley
committed
Aug 10, 2021
1 parent
f855e9f
commit cdf3c43
Showing
22 changed files
with
185,762 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,32 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: ['airbnb-typescript/base', 'plugin:prettier/recommended'], | ||
plugins: ['jest'], | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
extraFileExtensions: ['.cjs', '.mjs'], | ||
}, | ||
ignorePatterns: ['node_modules/', 'dist/', '.vscode/', 'src/generated/'], | ||
rules: { | ||
'no-console': 'off', | ||
'no-undef': 'error', | ||
'import/prefer-default-export': 'off', | ||
'@typescript-eslint/indent': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: '**/*.test.*', | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
}, | ||
}, | ||
], | ||
env: { | ||
'jest/globals': true, | ||
es6: true, | ||
node: true, | ||
}, | ||
}; |
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 @@ | ||
* @bbeesley |
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,12 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
timezone: Europe/London | ||
open-pull-requests-limit: 10 | ||
commit-message: | ||
prefix: chore | ||
include: scope |
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,34 @@ | ||
name: test-and-publish | ||
on: | ||
push: | ||
pull_request_target: | ||
types: [opened, synchronize, edited] | ||
status: {} | ||
jobs: | ||
build-test-merge-publish: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.17' | ||
- uses: bbeesley/build-test-merge-publish@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PA_TOKEN }} | ||
lint-commits: | ||
runs-on: ubuntu-latest | ||
if: ${{ (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') || (github.ref != 'refs/heads/main' && github.event_name == 'push') }} | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
- name: install | ||
run: npm ci | ||
- name: commitlint | ||
run: ./node_modules/.bin/commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD |
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,3 @@ | ||
node_modules | ||
.vscode | ||
.webpackCache |
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,9 @@ | ||
name: gha-auto-dependabot-rebase | ||
author: Bill Beesley <bill@beesley.dev> | ||
description: Github Action to automatically request dependabot rebases | ||
branding: | ||
icon: box | ||
color: blue | ||
runs: | ||
using: 'node12' | ||
main: 'dist/main.cjs' |
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 @@ | ||
module.exports = function configureBabel(api) { | ||
api.cache(true); // this tells babel to cache it's transformations, it's pretty good at checking file hashes and invalidating it's cache, but if you have problems with changes not being reflected you can set false here. | ||
|
||
const presets = [ | ||
[ | ||
'@babel/preset-env', // this plugin tells babel to transpile your code for a specific runtime environment, we'll use node | ||
{ | ||
targets: { | ||
node: '12.13.0', // this means transpile everything that node 12.13 (the version you get in lambda with node12) doesn't support | ||
}, | ||
modules: 'cjs', | ||
}, | ||
], | ||
[ | ||
'@babel/preset-typescript', // this plugin allows babel to work with typescript (bear in mind it will only transpile it, it doesn't care if you have type errors) | ||
], | ||
]; | ||
|
||
const plugins = []; | ||
|
||
return { | ||
presets, | ||
plugins, | ||
}; | ||
}; |
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 @@ | ||
overwrite: true | ||
schema: 'node_modules/@octokit/graphql-schema/schema.graphql' | ||
documents: | ||
- src/queries/*.graphql | ||
generates: | ||
src/generated/graphql.ts: | ||
plugins: | ||
- 'typescript' | ||
- 'typescript-resolvers' | ||
- 'typescript-document-nodes' | ||
- 'typescript-operations' |
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,9 @@ | ||
const { types } = require('conventional-commit-types'); | ||
|
||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'type-enum': [2, 'always', Object.keys(types)], | ||
'body-max-line-length': [0, 'always', 100], | ||
}, | ||
}; |
Oops, something went wrong.