Skip to content

Commit d5429d9

Browse files
authored
feat: initial commit (#12)
1 parent 6efa678 commit d5429d9

16 files changed

+4662
-53
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ updates:
44
- package-ecosystem: npm
55
directory: /
66
schedule:
7-
interval: weekly
7+
interval: monthly
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: monthly

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build-release:
9+
name: Build/Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 14
16+
cache: yarn
17+
- run: yarn install --frozen-lockfile
18+
- name: Run yarn commitlint --from=head_commit.message
19+
run: echo "${{ github.event.head_commit.message }}" | yarn commitlint
20+
- run: yarn prettier --check .
21+
- run: yarn cspell --no-must-find-files '**'
22+
- run: yarn semantic-release --branches ${{ github.ref_name }}
23+
env:
24+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-metadata.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PR / Metadata
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
types: [opened, synchronize, reopened, edited]
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
12+
jobs:
13+
validate-metadata:
14+
name: Validate metadata
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: 14
21+
cache: yarn
22+
- run: yarn install --frozen-lockfile
23+
- name: Run yarn commitlint --from=pull_request.title
24+
run: echo "${{ github.event.pull_request.title }}" | yarn commitlint
25+
auto-merge:
26+
name: Auto-merge
27+
if: ${{ github.actor == 'dependabot[bot]' }}
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: dependabot/fetch-metadata@v1.3.1
31+
id: dependabot-metadata
32+
with:
33+
github-token: "${{ secrets.GITHUB_TOKEN }}"
34+
- run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
35+
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-sources.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: PR / Sources
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
validate-sources:
9+
name: Validate sources
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 14
16+
cache: yarn
17+
- run: yarn install --frozen-lockfile
18+
- run: yarn prettier --check .
19+
- run: yarn cspell --no-must-find-files '**'

.gitignore

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
# Node.js
2-
/node_modules/
3-
npm-debug.log*
4-
yarn-debug.log*
5-
yarn-error.log*
6-
7-
# Misc
1+
node_modules
82
.DS_Store
9-
.AppleDouble
10-
.LSOverride
11-
logs
12-
*.log

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged

.vscode/extensions.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"recommendations": ["esbenp.prettier-vscode"]
2+
"recommendations": [
3+
"esbenp.prettier-vscode",
4+
"streetsidesoftware.code-spell-checker",
5+
"vivaxy.vscode-conventional-commits"
6+
]
37
}

.vscode/settings.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
// Code style
2+
"javascript.suggestionActions.enabled": false,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.formatOnSave": true,
35
"files.trimTrailingWhitespace": true,
46
"files.trimFinalNewlines": true,
57
"files.insertFinalNewline": true,
6-
"editor.defaultFormatter": "esbenp.prettier-vscode",
7-
"editor.formatOnSave": true,
8-
9-
// Misc
108
"files.exclude": {
11-
"node_modules/": true,
12-
"yarn.lock": true
13-
}
9+
"node_modules": true,
10+
"yarn.lock": true,
11+
".husky": true
12+
},
13+
"conventionalCommits.gitmoji": false
1414
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2021 Minh-Phuc Tran
3+
Copyright (c) 2020-2022 Minh-Phuc Tran
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)