Skip to content

Commit dfc77fe

Browse files
committed
Initial project
0 parents  commit dfc77fe

26 files changed

+7741
-0
lines changed

.eslintrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"prettier"
11+
],
12+
"overrides": [],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaVersion": "latest",
16+
"sourceType": "module"
17+
},
18+
"plugins": ["@typescript-eslint"],
19+
"rules": {
20+
"@typescript-eslint/no-explicit-any": "warn"
21+
}
22+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Check code quality.
2+
run-name: ${{ github.actor }} Check code quality.
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
- "!main"
8+
jobs:
9+
quality-check:
10+
name: Quality check
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository code
14+
uses: actions/checkout@v4
15+
- name: Setup Nodejs
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "20.x"
19+
registry-url: "https://registry.npmjs.org"
20+
- name: Install dependencies
21+
run: npm i
22+
- name: Run eslint
23+
run: npm run lint
24+
- name: Run prettier:check
25+
run: npm run prettier:check
26+
- name: Run test
27+
run: npm run test:coverage

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to npmjs.org.
2+
run-name: ${{ github.actor }} publish ${{ github.ref_name }} to npmjs.org. 🚀🚀🚀
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- v*
8+
jobs:
9+
publish:
10+
name: Publish to npmjs.org
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository code
14+
uses: actions/checkout@v4
15+
- name: Setup Nodejs
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "20.x"
19+
registry-url: "https://registry.npmjs.org"
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22+
- name: Install dependencies
23+
run: npm i
24+
- name: Run eslint
25+
run: npm run lint
26+
- name: Run prettier:check
27+
run: npm run prettier:check
28+
- name: Run test
29+
run: npm run test:coverage
30+
- name: Build
31+
run: npm run build
32+
- name: Publish ${{ github.ref_name }} to npmjs.org 🚀🚀🚀
33+
run: npm publish

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DS_Store
2+
/node_modules
3+
4+
# Ignore test-related files
5+
/coverage.data
6+
/coverage/
7+
8+
# Build files
9+
/dist

.husky/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
npm run lint
2+
npm run prettier:check
3+
npm run test

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
coverage
3+
dist

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.eslint": "always"
6+
}
7+
}

jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
};

0 commit comments

Comments
 (0)