Skip to content

Commit 0c65119

Browse files
author
Maurice Faber
authored
feat: shortcuts (#245)
1 parent 26b6556 commit 0c65119

File tree

108 files changed

+13529
-8646
lines changed

Some content is hidden

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

108 files changed

+13529
-8646
lines changed

.env.sample

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ USER_ID=${UID-}
22
GROUP_ID=${GID-}
33
# turn this on when you don't want a git commit and push, but only want the db updates:
44
DISABLE_SYNC=true
5-
# turn this on when you don't want to let core process the files (to encrypt etc), allowing to start api without it
6-
DISABLE_PROCESSING=false
75
# turn this off if only working with api, but leave on when accessing via console and authz is wanted:
86
NO_AUTHZ=true
97
# GIT_LOCAL_PATH='/tmp/otomi'

.eslintrc.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
---
22
root: true
33

4+
parser: '@typescript-eslint/parser'
45
parserOptions:
56
project: ['./tsconfig.json']
67
ecmaVersion: 2021
78

89
extends:
10+
# - airbnb-base
911
- eslint:recommended
1012
- plugin:@typescript-eslint/eslint-recommended
1113
- plugin:@typescript-eslint/recommended
1214
- plugin:@typescript-eslint/recommended-requiring-type-checking
13-
- airbnb-base
14-
- plugin:prettier/recommended
15-
- prettier
16-
- prettier/@typescript-eslint
15+
- plugin:chai-friendly/recommended
1716
- plugin:import/errors
18-
- plugin:import/warnings
1917
- plugin:import/typescript
20-
- plugin:chai-friendly/recommended
18+
- plugin:import/warnings
19+
- plugin:prettier/recommended
20+
# - prettier/@typescript-eslint
2121

2222
plugins:
2323
- import
24-
- prettier
2524
- '@typescript-eslint'
2625

2726
settings:
2827
import/resolver:
2928
node:
3029
extensions: ['.ts']
30+
paths: [src]
3131

3232
env:
3333
es6: true
@@ -49,18 +49,22 @@ rules:
4949
'@typescript-eslint/no-unsafe-call': off
5050
'@typescript-eslint/no-non-null-assertion': off
5151
'@typescript-eslint/no-floating-promises': off
52-
func-names: 'off'
53-
import/no-extraneous-dependencies: off
54-
import/extensions: off
52+
comma-dangle: [error, only-multiline]
53+
curly: [error, multi-or-nest]
5554
eol-last: ['error', 'always']
56-
no-shadow: warn
57-
no-unused-vars: warn
58-
prefer-destructuring: error
59-
no-use-before-define: 'off'
60-
no-console: 'off'
61-
object-shorthand: error
62-
no-debugger: error
55+
func-names: off
56+
import/extensions: off
57+
import/no-extraneous-dependencies: off
58+
no-console: off
59+
no-debugger: warn
60+
no-fallthrough: warn
6361
no-param-reassign:
6462
- error
6563
- props: true
6664
ignorePropertyModificationsFor: [memo]
65+
no-shadow: warn
66+
no-unused-vars: warn
67+
no-use-before-define: off
68+
object-shorthand: error
69+
prefer-destructuring: warn
70+
prefer-template: error

.github/workflows/main.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,21 @@ jobs:
8181
release_name: Release ${{ steps.git_tag.outputs.tag }}
8282
body: ${{ steps.git_tag.outputs.changes }}
8383

84-
check-build-push-npm:
85-
runs-on: ubuntu-latest
86-
needs: build-test-push-release
87-
if: "contains(github.event.head_commit.message, 'chore(release)') && github.ref == 'refs/heads/master'"
88-
steps:
89-
- name: Checkout
90-
uses: actions/checkout@v2
91-
- uses: actions/setup-node@v2
92-
with:
93-
node-version: '14'
94-
registry-url: https://npm.pkg.github.com/
95-
scope: '@redkubes'
96-
- name: Build and publish packages
97-
env:
98-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99-
run: |
100-
npm install
101-
npm run release:npm
84+
# check-build-push-npm:
85+
# runs-on: ubuntu-latest
86+
# needs: build-test-push-release
87+
# if: "contains(github.event.head_commit.message, 'chore(release)') && github.ref == 'refs/heads/master'"
88+
# steps:
89+
# - name: Checkout
90+
# uses: actions/checkout@v2
91+
# - uses: actions/setup-node@v2
92+
# with:
93+
# node-version: '14'
94+
# registry-url: https://npm.pkg.github.com/
95+
# scope: '@redkubes'
96+
# - name: Build and publish packages
97+
# env:
98+
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
# run: |
100+
# npm install
101+
# npm run release:client

.github/workflows/renovate.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Renovate
2+
on:
3+
schedule:
4+
- cron: '0/30 * * * *'
5+
jobs:
6+
renovate:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 5
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2.4.0
12+
- name: Setup node
13+
uses: actions/setup-node@v2.5.1
14+
with:
15+
node-version: 14
16+
- name: Install project
17+
run: npm ci --ignore-scripts
18+
- name: Build
19+
run: npm run build
20+
- name: Renovate
21+
uses: renovatebot/github-action@v26.21.7
22+
with:
23+
configurationFile: .github/renovate.json
24+
token: ${{ secrets.NPM_TOKEN }}

.mocharc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
file:
2+
- src/test-init.ts
3+
files: src/**/*.test.ts
4+
require: ts-node/register
5+
timeout: 5000

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.history/
2-
CHANGELOG.md
2+
dist/
3+
package-*.json
4+
CHANGELOG.md

.prettierrc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@ trailingComma: all
33
singleQuote: true
44
printWidth: 120
55
jsxSingleQuote: true
6+
overrides:
7+
- files:
8+
- 'test/env/**/*.yaml'
9+
options:
10+
tabWidth: 4
11+
useTabs: true

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"donjayamanne.githistory",
77
"eamodio.gitlens",
88
"esbenp.prettier-vscode",
9+
"foxundermoon.shell-format",
910
"pascalreitermann93.vscode-yaml-sort",
1011
"quicktype.quicktype",
1112
"hbenl.vscode-mocha-test-adapter",

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"type": "pwa-node",
4040
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
4141
"request": "launch",
42-
"name": "Mocha All (transpiled)",
42+
"name": "Mocha All",
4343
"args": ["--timeout", "999999", "--colors", "${workspaceFolder}/src/**/*.test.ts"],
4444
"env": {
4545
"NODE_ENV": "test"

.vscode/settings.json

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,32 @@
22
"[dotenv]": {
33
"editor.defaultFormatter": "foxundermoon.shell-format"
44
},
5+
"[javascript]": {
6+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
7+
},
8+
"[shellscript]": {
9+
"editor.defaultFormatter": "foxundermoon.shell-format"
10+
},
11+
"[typescript]": {
12+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
13+
},
514
"cSpell.diagnosticLevel": "Hint",
15+
"cSpell.enabled": true,
616
"editor.codeActionsOnSave": {
7-
"source.fixAll": true
17+
"source.addMissingImports": true,
18+
"source.fixAll": true,
19+
"source.organizeImports": true
820
},
9-
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
21+
"editor.defaultFormatter": "esbenp.prettier-vscode",
1022
"editor.formatOnSave": true,
1123
"eslint.format.enable": true,
1224
"eslint.validate": ["javascript", "typescript"],
13-
"files.watcherExclude": {
14-
"**/.git/objects/**": true,
15-
"**/.git/subtree-cache/**": true,
16-
"**/node_modules/*/**": true
17-
},
1825
"mochaExplorer.env": {
1926
"NODE_ENV": "test"
2027
},
21-
"mochaExplorer.files": "src/*.test.ts",
28+
"mochaExplorer.configFile": ".mocharc.yml",
29+
"mochaExplorer.files": "src/**/*.test.ts",
2230
"mochaExplorer.require": "ts-node/register",
23-
"mochaExplorer.timeout": 20000,
31+
"mochaExplorer.timeout": 5000,
2432
"prettier.enable": true
2533
}

0 commit comments

Comments
 (0)