Skip to content

Commit

Permalink
chore: make template
Browse files Browse the repository at this point in the history
  • Loading branch information
imranbarbhuiya committed Mar 20, 2022
0 parents commit e5c8154
Show file tree
Hide file tree
Showing 28 changed files with 7,367 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"projectName": "template",
"projectOwner": "imranbarbhuiya",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": true,
"commitConvention": "angular",
"contributors": [],
"contributorsPerLine": 7,
"skipCi": true
}
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.github
.yarn
dist
index.js
33 changes: 33 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"quotes": ["error", "single"],
"semi": ["error", "always"],
"eol-last": ["error", "always"],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}
],
"arrow-parens": ["error", "always"],
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
"prefer-const": "error",
"accessor-pairs": "off",
"no-async-promise-executor": "off",
"no-unused-vars": "off",
"node/no-missing-require": "off",
"no-console": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-shadow": "warn"
}
}
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:


**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.


**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**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.

**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.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Install node.js v16
uses: actions/[email protected]
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: yarn.lock

- name: Install dependencies
run: yarn --immutable

- name: Build
run: yarn build
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Docs

on:
release:
types:
- published

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Install node.js v16
uses: actions/[email protected]
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: yarn.lock

- name: Install dependencies
run: yarn --immutable

- name: Generate Docs
run: yarn docs

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Lint

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Install node.js v16
uses: actions/[email protected]
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: yarn.lock

- name: Install dependencies
run: yarn --immutable

- name: Run linters
uses: wearerequired/lint-action@v1
with:
eslint: true
eslint_extensions: js,ts
auto_fix: true
commit_message: 'chore(ci): ${linter} issues fix'
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Package to npmjs

on:
release:
types:
- published

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Install node.js v16
uses: actions/[email protected]
with:
node-version: 16
registry-url: https://registry.npmjs.org/
cache: 'yarn'
cache-dependency-path: yarn.lock

- name: Install dependencies
run: yarn --immutable

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Install node.js v16
uses: actions/[email protected]
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: yarn.lock

- name: Install dependencies
run: yarn --immutable

- name: Test
run: yarn test --coverage

- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage/coverage-final.json
Loading

0 comments on commit e5c8154

Please sign in to comment.