Skip to content

Commit f904858

Browse files
committed
Initial commit
0 parents  commit f904858

File tree

18 files changed

+13885
-0
lines changed

18 files changed

+13885
-0
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HELLO=WORLD

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/*.js
2+
node_modules
3+
dist

.eslintrc.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"env": {
3+
"es2021": true,
4+
"node": true,
5+
"jest": true
6+
},
7+
"extends": [
8+
"standard",
9+
"plugin:@typescript-eslint/recommended",
10+
"prettier",
11+
"plugin:prettier/recommended"
12+
],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaVersion": "latest",
16+
"sourceType": "module"
17+
},
18+
"plugins": [
19+
"@typescript-eslint",
20+
"prettier"
21+
],
22+
"rules": {
23+
"prettier/prettier": ["error", {"singleQuote": true}],
24+
"indent": ["error", 4]
25+
}
26+
}

.github/workflows/main.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Use Node.js 16.x
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: 16.x
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Run Build
28+
run: npm run build --if-present
29+
30+
- name: Run Tests
31+
run: npm test

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea/
2+
build/
3+
dist/
4+
node_modules/
5+
.env

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"tabWidth": 4,
3+
"quoteProps": "as-needed",
4+
"singleQuote": true,
5+
"printWidth": 120,
6+
"semi": true,
7+
"useTabs": false,
8+
"trailingComma": "all",
9+
"arrowParens": "avoid",
10+
"endOfLine": "auto"
11+
}

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "attach",
10+
"name": "Attach to start:dev",
11+
"protocol": "inspector",
12+
"port": 9229,
13+
"restart": true,
14+
"cwd": "${workspaceRoot}"
15+
}
16+
]
17+
}

jest.config.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
2+
module.exports = {
3+
preset: 'ts-jest',
4+
testEnvironment: 'node',
5+
rootDir: process.cwd(),
6+
coverageDirectory: '<rootDir>/build/.jestcoverage',
7+
cacheDirectory: '<rootDir>/build/.jestcache',
8+
collectCoverage: true,
9+
coverageReporters: ['lcov', 'text', 'html'],
10+
collectCoverageFrom: [
11+
'<rootDir>/src/**/*.{ts,js}',
12+
'!<rootDir>/src/index.{ts,js}'
13+
],
14+
coverageThreshold: {
15+
global: {
16+
branches: 90,
17+
functions: 90,
18+
lines: 90,
19+
statements: 90,
20+
},
21+
},
22+
testRegex: '(/tests/.*|(\\.|/)(test|spec))\\.(j|t)sx?$',
23+
clearMocks: true
24+
};

0 commit comments

Comments
 (0)