Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
maht0rz committed Mar 27, 2023
0 parents commit 528fe44
Show file tree
Hide file tree
Showing 32 changed files with 37,714 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"extends": ["hardcore", "hardcore/ts", "hardcore/jest"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"root": true,
"parserOptions": {
"project": ["./tsconfig.json", "./tsconfig.test.json"]
},
"ignorePatterns": ["jest.config.cjs", "jest-stackblitz.config.cjs", "docs/*"],
"rules": {
"@typescript-eslint/quotes": [
"error",
"single",
{
"allowTemplateLiterals": true
}
],
"@typescript-eslint/parameter-properties": [
"error",
{
"allow": ["public"]
}
],
"jest/no-hooks": [
"error",
{
"allow": ["beforeEach", "afterEach", "beforeAll", "afterAll"]
}
],
"@typescript-eslint/consistent-indexed-object-style": "off",
"import/no-extraneous-dependencies": ["error", {"peerDependencies": true}]

}
}
93 changes: 93 additions & 0 deletions .github/workflows/pull-request-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# This workflow runs lint/test/build in parallel
# on every pull request to develop
# It also produces test coverage comments
name: 'Validate PRs to develop'
on:
# run on every pull request
pull_request:
# only for the following branches
branches:
- develop

jobs:
# Installs npm dependencies for the first time,
# caching them in ~/.npm
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
# This only caches ~/.npm, therefore each subsequent
# job needs to run `npm ci` to install deps from npm cache
# alternative is to cache `node_modules` directly
# TODO:
# https://www.voorhoede.nl/en/blog/super-fast-npm-install-on-github-actions/
# Add caching of `node_modules` to speed up this workflow
cache: npm

# install dependencies from the package-lock.json
- name: Install dependencies
run: npm ci --workspaces

# builds all packages
build:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: 'Install dependencies'
run: npm ci --workspaces --include-workspace-root

- name: 'Build'
run: npm run build

# lints all packages
lint:
runs-on: ubuntu-latest
needs: install
steps:
# check out the repository
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: 'Install dependencies'
run: npm ci --workspaces --include-workspace-root

- name: 'Build'
run: npm run build

- name: 'Lint'
run: npm run lint

# tests all packages
test:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: 'Install dependencies'
run: npm ci --workspaces --include-workspace-root

- name: 'Build'
run: npm run build

- name: 'Reinstall monorepo packages'
run: npm ci --workspaces --include-workspace-root

- name: 'Test'
run: npm run test:ci
21 changes: 21 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# this workflow validates the PR names for the `develop` branch
name: 'Semantic pull request'

on:
pull_request_target:
branches:
- develop
types:
- opened
- edited
- synchronize

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
# GITHUB_TOKEN was necessary for access to some PR data
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
dist
tmp
/out-tsc

# dependencies
node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
lerna-debug.log
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx branch-name-lint branch-name-lint.json
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add files here to ignore them from prettier formatting

/dist
/coverage
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"endOfLine": "auto"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode"]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"js/ts.implicitProjectConfig.experimentalDecorators": true
}
Loading

0 comments on commit 528fe44

Please sign in to comment.