Skip to content

Commit

Permalink
feat: use options object isntead of parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
joneff committed Jul 28, 2021
1 parent 0e8546f commit 00da86d
Show file tree
Hide file tree
Showing 21 changed files with 7,311 additions and 798 deletions.
36 changes: 36 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"header-max-length": [
2,
"always",
100
],
"type-case": [
1,
"always",
[
"lower-case",
"upper-case"
]
],
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"chore",
"revert",
"WIP"
]
]
}
}
12 changes: 2 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,10 @@ max_line_length = off
indent_style = space
indent_size = 4

[*.js]
[*.{js,json}]
indent_style = space
indent_size = 4

[*.yml]
indent_style = space
indent_size = 4

[*.json]
indent_style = space
indent_size = 4

[package.json]
[{package.json,*.yml}]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/node_modules
6 changes: 4 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"dot-location": [ "error", "property" ],
"eqeqeq": [ "error", "always" ],
"indent": [ "error", 4, { "SwitchCase": 1 } ],
"jsx-quotes": "error",
"key-spacing": [ "error", { "beforeColon": false, "afterColon": true } ],
"keyword-spacing": [ "error", { "before": true, "after": true } ],
"linebreak-style": [ "error", "unix" ],
Expand All @@ -33,13 +34,13 @@
"no-confusing-arrow": "error",
"no-console": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-else-return": "error",
"no-eval": "error",
"no-dupe-class-members": "error",
"no-implied-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-implicit-coercion": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
Expand All @@ -58,6 +59,7 @@
"no-useless-call": "error",
"no-var": "error",
"object-curly-spacing": [ "error", "always" ],
"quotes": [ "error", "single" ],
"semi": [ "error", "always" ],
"semi-spacing": "error",
"space-before-blocks": "error",
Expand Down
20 changes: 12 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "03:00"
open-pull-requests-limit: 10
reviewers:
- joneff
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
target-branch: "develop"
allow:
- dependency-name: "*"
dependency-type: "direct"
reviewers:
- "joneff"
5 changes: 0 additions & 5 deletions .github/workflows/.editorconfig

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/branch_push_workflow.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/ci_unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI | Unit

defaults:
run:
shell: bash

env:
CI: true

on:
push:
branches:
- '**'

jobs:

run-tests:
name: Run tests

runs-on: ubuntu-latest

steps:

- name: Checkout branch
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Install
run: npm ci

- name: Lint
run: npm run eslint

- name: Tests
run: npm run mocha-dots

ci-unit:
name: CI | Unit
needs: run-tests

runs-on: ubuntu-latest

steps:

# IMPORTANT NOTE
#
# You can not set a workflow to be status check. The job is. Hence the trickery...

- name: Done
run: echo "Done!"
31 changes: 31 additions & 0 deletions .github/workflows/merge_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Merge develop to master

defaults:
run:
shell: bash

env:
CI: true

on: [workflow_dispatch]

jobs:

merge:
name: Merge

runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v2
with:
ref: master

- name: Merge develop to master
run: |
git fetch --quiet
git reset --hard origin/master
git merge --ff-only --quiet origin/develop
git push origin master
46 changes: 46 additions & 0 deletions .github/workflows/release_stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release stable channel

defaults:
run:
shell: bash

env:
CI: true

on: [workflow_dispatch]

jobs:

release-stable:
runs-on: ubuntu-latest

steps:

- name: Checkout branch
uses: actions/checkout@v2
with:
ref: master

- name: Merge develop to master
run: |
git fetch --quiet
git reset --hard origin/master
git merge --ff-only --quiet origin/develop
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Install
run: npm ci

- name: Publish
run: npx semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update develop
run: |
git push origin master:develop --quiet > /dev/null 2>&1
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ debug.log
.DS_Store

# Lock files
package-lock.json
# package-lock.json

# Other
*.tgz
30 changes: 18 additions & 12 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
ISC License
MIT License

Copyright (c) 2019, Ivan Zhekov

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit 00da86d

Please sign in to comment.