Skip to content
Merged

V5 #8

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 0 additions & 125 deletions .eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .git-hooks/install-hooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

git config core.hooksPath ./.git-hooks
22 changes: 22 additions & 0 deletions .git-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# https://dev.to/krzysztofkaczy9/do-you-really-need-husky-247b

export PATH=$PATH:/usr/local/go/bin

RED="\033[1;31m"
GREEN="\033[1;32m"
NC="\033[0m"

linter_exit_code=1

npx lint-staged

linter_exit_code=$?
if [ $linter_exit_code -ne 0 ]
then
echo "${RED} X Linter errors have occurred ${NC}"
exit 1
else
echo "${GREEN} ✔ Linter didn't find any errors ${NC}"
exit 0
fi
39 changes: 13 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18, 20, 22]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Fetch Repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install && pnpm install -g codecov
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: pnpm install
- name: Run linter
run: pnpm lint
- name: Run tests
run: npm test
run: pnpm test
- name: Code coverage
run: pnpm coverage:codecov
- name: Upload coverage reports
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
8 changes: 0 additions & 8 deletions .husky/pre-commit

This file was deleted.

7 changes: 0 additions & 7 deletions .mocharc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
8 changes: 7 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "auto"
"endOfLine": "auto",

"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrderParserPlugins" : ["typescript", "decorators-legacy"],
"importOrder": ["^[./]"],
"importOrderCaseInsensitive": true,
"importOrderSeparation": true
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023 Alexander Mac
Copyright (c) 2023-2025 Alexander Mac

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
42 changes: 42 additions & 0 deletions demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

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

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db
6 changes: 6 additions & 0 deletions demo/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"(src)/**/*.ts": [
"prettier --write",
"eslint --fix"
]
}
1 change: 1 addition & 0 deletions demo/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
18 changes: 18 additions & 0 deletions demo/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "auto",

"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrderParserPlugins" : ["typescript", "decorators-legacy"],
"importOrder": ["^@app/(.*)$", "^[./]"],
"importOrderCaseInsensitive": true,
"importOrderSeparation": true
}
Loading
Loading