Skip to content

Commit a89f5ae

Browse files
committed
Initial commit
0 parents  commit a89f5ae

File tree

253 files changed

+22234
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+22234
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# Set default charset
12+
charset = utf-8
13+
indent_style = space
14+
indent_size = 2
15+
editor.formatOnSave = true

.devcontainer/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ARG VARIANT="14-buster"
2+
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
3+
4+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5+
&& apt-get -y install --no-install-recommends build-essential

.devcontainer/devcontainer.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "bautajs",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": {
6+
"VARIANT": "14"
7+
}
8+
},
9+
10+
"settings": {
11+
"terminal.integrated.shell.linux": "/bin/bash"
12+
},
13+
14+
"extensions": [
15+
"dbaeumer.vscode-eslint",
16+
"Orta.vscode-jest",
17+
"EditorConfig.EditorConfig",
18+
"esbenp.prettier-vscode"
19+
],
20+
21+
"postCreateCommand": "npm ci",
22+
23+
"containerUser": "node",
24+
"mounts": [
25+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.npmrc,target=/home/node/.npmrc,type=bind,consistency=cached"
26+
]
27+
}

.eslintignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
dist/
2+
node_modules/
3+
coverage/
4+
target/
5+
*.csv
6+
*.dat
7+
*.iml
8+
*.log
9+
*.out
10+
*.pid
11+
*.seed
12+
*.sublime-*
13+
*.swo
14+
*.swp
15+
*.tgz
16+
packages/bautajs-core/benchmark/legacy/*.js

.eslintrc

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"extends": [
3+
"airbnb-base",
4+
"airbnb-typescript/base",
5+
"plugin:jest/all",
6+
"plugin:prettier/recommended",
7+
"prettier"
8+
],
9+
"parser": "@typescript-eslint/parser",
10+
"parserOptions": {
11+
"ecmaVersion": 2020,
12+
"project": "./tsconfig.base.json",
13+
"sourceType": "module"
14+
},
15+
"overrides": [
16+
{
17+
"files": "**/__tests__/*.js",
18+
"rules": {
19+
"example-internal/no-focused-tests": 2
20+
}
21+
}
22+
],
23+
"plugins": ["import", "prettier", "jest"],
24+
"rules": {
25+
"@typescript-eslint/member-delimiter-style": [
26+
"error",
27+
{
28+
"multiline": {
29+
"delimiter": "semi",
30+
"requireLast": true
31+
}
32+
}
33+
],
34+
"@typescript-eslint/no-use-before-define": [
35+
"error",
36+
{
37+
"functions": false
38+
}
39+
],
40+
"comma-dangle": ["error", "never"],
41+
"import/no-extraneous-dependencies": "off",
42+
"import/prefer-default-export": "off",
43+
"jest/consistent-test-it": 0,
44+
"jest/no-hooks": 0,
45+
"jest/require-hook": 0,
46+
"jest/prefer-expect-assertions": 0,
47+
"jest/no-conditional-in-test": 0,
48+
"no-multiple-empty-lines": [
49+
"error",
50+
{
51+
"max": 1
52+
}
53+
],
54+
"no-useless-constructor": "off",
55+
"prettier/prettier": [
56+
"error",
57+
{
58+
"singleQuote": true,
59+
"printWidth": 100
60+
}
61+
],
62+
"no-promise-executor-return": 0,
63+
"class-methods-use-this": "warn"
64+
}
65+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Bug report
2+
3+
## Describe the bug
4+
5+
A clear and concise description of what the bug is.
6+
7+
### To Reproduce
8+
9+
A code snippet or a repository with a test project where the issue can be reproduced.
10+
11+
### Expected behavior
12+
13+
A clear and concise description of what you expected to happen.
14+
15+
### Screenshots
16+
17+
If applicable, add screenshots to help explain your problem.
18+
19+
### Desktop (please complete the following information):\*\*
20+
21+
- OS: [e.g. Linux, MacOSX, Windows 10]
22+
- fp-toolbox version [e.g. v1.0.0]
23+
- Node.js version [e.g. v12.14.1]
24+
25+
### Additional context
26+
27+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Feature request
2+
3+
## Is your feature request related to a problem? Please describe
4+
5+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
6+
7+
## Describe the solution you'd like
8+
9+
A clear and concise description of what you want to happen.
10+
11+
## Describe alternatives you've considered
12+
13+
A clear and concise description of any alternative solutions or features you've considered.
14+
15+
## Additional context
16+
17+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Pull Request Template
2+
3+
## PR Checklist
4+
5+
- [ ] I have run `npm test` locally and all tests are passing.
6+
- [ ] I have added/updated tests for any new behavior.
7+
- [ ] I have added/updated documentation for any new behavior.
8+
- [ ] If this is a significant change, an issue has already been created where the problem / solution was discussed: [N/A, or add link to issue here]
9+
10+
## PR Description
11+
12+
<!-- Describe Your PR Here! -->

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [14.x, 16.x]
16+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
- run: npm install
25+
- run: npm run lint
26+
- run: npm run build --if-present
27+
- run: npm test

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Publish npm version when new GitHub release
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
publish-npm:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v2
16+
with:
17+
node-version: 16
18+
registry-url: https://registry.npmjs.org/
19+
- run: npm i
20+
- run: npm run build
21+
- run: npm test
22+
- run: npm run release:from-package
23+
env:
24+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
*.csv
2+
*.dat
3+
*.iml
4+
*.log
5+
*.out
6+
*.pid
7+
*.seed
8+
*.sublime-*
9+
*.swo
10+
*.swp
11+
*.tgz
12+
.DS_Store
13+
.idea
14+
.project
15+
.strong-pm
16+
coverage
17+
node_modules
18+
npm-debug.log
19+
*.jtl
20+
logs
21+
target/*
22+
npm-shrinkwrap.json
23+
.history/
24+
.settings/
25+
junit.xml
26+
package-lock.json
27+
!/.github/actions/*/package-lock.json
28+
# Ignore the compiled output.
29+
dist/
30+
coverage/
31+
32+
# TypeScript incremental compilation cache
33+
*.tsbuildinfo

.husky/.gitignore

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

.husky/_/husky.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env sh
2+
if [ -z "$husky_skip_init" ]; then
3+
debug () {
4+
if [ "$HUSKY_DEBUG" = "1" ]; then
5+
echo "husky (debug) - $1"
6+
fi
7+
}
8+
9+
readonly hook_name="$(basename -- "$0")"
10+
debug "starting $hook_name..."
11+
12+
if [ "$HUSKY" = "0" ]; then
13+
debug "HUSKY env variable is set to 0, skipping hook"
14+
exit 0
15+
fi
16+
17+
if [ -f ~/.huskyrc ]; then
18+
debug "sourcing ~/.huskyrc"
19+
. ~/.huskyrc
20+
fi
21+
22+
readonly husky_skip_init=1
23+
export husky_skip_init
24+
sh -e "$0" "$@"
25+
exitCode="$?"
26+
27+
if [ $exitCode != 0 ]; then
28+
echo "husky - $hook_name hook exited with code $exitCode (error)"
29+
fi
30+
31+
if [ $exitCode = 127 ]; then
32+
echo "husky - command not found in PATH=$PATH"
33+
fi
34+
35+
exit $exitCode
36+
fi

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run lint && npm test

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.json
2+
*.md
3+
*.snap
4+
5+
dist/
6+
coverage/
7+
coverages/

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"arrowParens": "avoid",
5+
"trailingComma": "none"
6+
}

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"Orta.vscode-jest",
5+
"EditorConfig.EditorConfig",
6+
"esbenp.prettier-vscode",
7+
"ms-vscode-remote.remote-containers"
8+
]
9+
}

0 commit comments

Comments
 (0)