generated from PrivateAIM/typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 1
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 ce59600
Showing
28 changed files
with
15,597 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,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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 @@ | ||
{ | ||
"extends": [ | ||
"@tada5hi/eslint-config-typescript" | ||
], | ||
"parserOptions": { | ||
"project": "./tsconfig.eslint.json" | ||
}, | ||
"ignorePatterns": ["**/dist/*", "**/*.d.ts"], | ||
"globals": { | ||
"NodeJS": 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 @@ | ||
github: [tada5hi] |
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: 🚨 Bug report | ||
about: Report a bug report, to improve this project. | ||
title: 'Bug: ' | ||
labels: 'bug-report' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- 💚 Thanks for your time to make this project better with your feedback 💚 | ||
**IMPORTANT** Before reporting a bug: | ||
👍 A properly detailed bug report can save a LOT of time and help fixing issues as soon as possible. | ||
--> | ||
|
||
### Versions | ||
- Node: <!-- e.g. Node 16 --> | ||
- OS: <!-- e.g. Windows 99> --> | ||
|
||
### Reproduction | ||
|
||
<details open> | ||
<summary>Additional Details</summary> | ||
</details> | ||
|
||
### Steps to reproduce | ||
|
||
|
||
### What is Expected? | ||
|
||
|
||
### What is actually happening? |
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,6 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: ❗️ All other issues | ||
url: https://github.com/Tada5hi/typescript-template/discussions | ||
about: | | ||
Please use GitHub Discussions for other issues and asking questions. |
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,26 @@ | ||
--- | ||
name: 🧠 Feature request | ||
about: Suggest an idea or enhancement for this project | ||
title: 'Feature: ' | ||
labels: 'feature-request' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- 💚 Thanks for your time to make this project better with your feedback 💚 --> | ||
|
||
### Is your feature request related to a problem? Please describe. | ||
|
||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> | ||
|
||
### Describe the solution you'd like | ||
|
||
<!-- A clear and concise description of what you want to happen. Adding some code examples would be neat! --> | ||
|
||
### Describe alternatives you've considered | ||
|
||
<!-- A clear and concise description of any alternative solutions or features you've considered. --> | ||
|
||
### Additional context | ||
|
||
<!-- Add any other context or screenshots about the feature request here. --> |
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,20 @@ | ||
name: 'Build' | ||
description: 'Prepares the repo for a job by running the build' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Use cache | ||
id: 'cache' | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/dist/** | ||
**/bin/** | ||
key: ${{ runner.os }}-build-${{ github.sha }} | ||
|
||
- name: Build | ||
shell: bash | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
npm run build |
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,37 @@ | ||
name: 'Install' | ||
description: 'Prepares the repo for a job by checking out and installing dependencies' | ||
inputs: | ||
node-version: | ||
description: 'The node version to setup' | ||
required: true | ||
registry-url: | ||
description: 'Define registry-url' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: echo github.ref | ||
shell: bash | ||
run: echo ${{ github.ref }} | ||
|
||
- name: Use Node.js ${{ inputs.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
registry-url: ${{ inputs.registry-url }} | ||
|
||
- name: Use cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: ${{ runner.os }}-install-${{ hashFiles('**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-install- | ||
- name: Install | ||
shell: bash | ||
run: | | ||
npm ci |
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 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
target-branch: "develop" | ||
schedule: | ||
interval: "daily" | ||
|
||
# Maintain dependencies for npm | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
versioning-strategy: "increase" | ||
open-pull-requests-limit: 10 | ||
target-branch: "develop" | ||
commit-message: | ||
prefix: "fix" | ||
prefix-development: "build" | ||
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,132 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [develop, master, next, beta, alpha] | ||
pull_request: | ||
branches: [develop, master, next, beta, alpha] | ||
|
||
permissions: | ||
packages: write | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
|
||
env: | ||
PRIMARY_NODE_VERSION: 18 | ||
|
||
jobs: | ||
install: | ||
name: Checkout and Install | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
|
||
lint: | ||
name: Lint | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
|
||
- name: Build | ||
uses: ./.github/actions/build | ||
|
||
- name: Lint | ||
run: | | ||
npm run lint | ||
build: | ||
name: Build | ||
needs: [install] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
- name: Build | ||
uses: ./.github/actions/build | ||
|
||
tests: | ||
name: Test | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
|
||
- name: Build | ||
uses: ./.github/actions/build | ||
|
||
- name: Run tests | ||
run: | | ||
npm run test | ||
release: | ||
name: Release | ||
needs: [lint, tests] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
|
||
- name: Build | ||
uses: ./.github/actions/build | ||
|
||
#- name: Release | ||
#env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# | ||
# run: npx semantic-release | ||
|
||
coverage: | ||
name: Coverage | ||
needs: [release] | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref_name == 'master' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/actions/install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
|
||
- name: Build | ||
uses: ./.github/actions/build | ||
|
||
- name: Coverage | ||
run: | | ||
npm run test:coverage | ||
#- name: Upload report | ||
# uses: codecov/[email protected] | ||
# with: | ||
# token: ${{ secrets.codecov }} | ||
# directory: ./coverage/ |
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,16 @@ | ||
.DS_Store | ||
bin | ||
dist | ||
doc | ||
node_modules | ||
.vscode | ||
.nyc_output | ||
coverage | ||
*.log | ||
npm-debug.log* | ||
.idea | ||
reports | ||
db.sqlite | ||
.env | ||
cache | ||
.swc |
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 @@ | ||
#!/usr/bin/env sh | ||
# | ||
# Copyright (c) 2023. | ||
# Author Peter Placzek (tada5hi) | ||
# For the full copyright and license information, | ||
# view the LICENSE file that was distributed with this source code. | ||
# | ||
|
||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit |
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 @@ | ||
#!/usr/bin/env sh | ||
# | ||
# Copyright (c) 2023. | ||
# Author Peter Placzek (tada5hi) | ||
# For the full copyright and license information, | ||
# view the LICENSE file that was distributed with this source code. | ||
# | ||
|
||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,38 @@ | ||
# Code of Conduct | ||
The goal is to create a community that is open and welcoming to all individuals. | ||
To achieve this, we have developed a code of conduct that outlines the expectations for behavior of all members of our community. | ||
|
||
## Pledge | ||
This community is founded on respect and understanding. | ||
All members are expected to treat others with respect and empathy, and to not tolerate any form of discrimination, | ||
harassment, or attacks. | ||
|
||
## Expectations | ||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and sexual attention or advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Responsibilities | ||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate | ||
and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, | ||
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily | ||
or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Contact | ||
If you feel uncomfortable or believe that someone has violated the code of conduct, p | ||
lease contact us at [[email protected]](mailto:[email protected]). | ||
We will thoroughly investigate the incident and aim for the best possible outcome. |
Oops, something went wrong.