Skip to content

Commit

Permalink
feat(eslint-config): Add max-depth (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennycode authored May 12, 2024
1 parent 924440b commit dd2e04c
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
day: 'tuesday'
interval: 'monthly'
time: '02:00'
timezone: 'Europe/Berlin'
- package-ecosystem: 'npm'
directory: '/'
schedule:
day: 'tuesday'
interval: 'monthly'
time: '02:00'
timezone: 'Europe/Berlin'
pull-request-branch-name:
separator: '-'
open-pull-requests-limit: 99
target-branch: 'main'
commit-message:
prefix: 'chore'
include: 'scope'
14 changes: 14 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'type: bug(fix) 🐞':
title: '^fix(\(.+\))?:.*'
'type: chore 🧹':
title: '^chore(\(.+\))?:.*'
'type: docs 📋':
title: '^docs(\(.+\))?:.*'
'type: feature ✨':
title: '^feat(\(.+\))?:.*'
'type: refactor 🔧':
title: '^refactor(\(.+\))?:.*'
'type: style 🎨':
title: '^style(\(.+\))?:.*'
'type: test 🧪':
title: '^test(\(.+\))?:.*'
22 changes: 22 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#example-configuration
changelog:
exclude:
authors:
- 'dependabot'
categories:
- title: 'New'
labels:
- 'type: feature ✨'
- title: 'Improved'
labels:
- 'type: docs 📋'
- 'type: style 🎨'
- title: 'Fixed'
labels:
- 'type: bug(fix) 🐞'
- title: 'Documentation'
labels:
- 'type: docs 📋'
- title: 'Other Changes'
labels:
- '*'
15 changes: 15 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Create Release'

on:
push:
tags:
- 'v*.*.*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 'Create Release'
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
14 changes: 14 additions & 0 deletions .github/workflows/generate-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Generate Labels'

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
label:
name: 'Label PR based on title'
runs-on: ubuntu-latest
steps:
- uses: srvaroa/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
26 changes: 26 additions & 0 deletions .github/workflows/merge-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Merge Dependencies'

# https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
on: [pull_request_target]

permissions:
pull-requests: write
contents: write

jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request#about-auto-merge
- name: 'Enable auto-merge on PR'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Approve PR'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
17 changes: 17 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-coverage:
uses: bennycode/actions/.github/workflows/test-coverage-yarn.yml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions packages/eslint-config/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"prefer-inline": true
}
],
"max-depth": ["warn", 4],
"no-cond-assign": "error",
"no-console": "off",
"no-const-assign": "error",
Expand Down

0 comments on commit dd2e04c

Please sign in to comment.