Skip to content

Commit

Permalink
Merge pull request #2 from oznu/master
Browse files Browse the repository at this point in the history
Update my fork with recent changes
  • Loading branch information
tooh committed Feb 22, 2021
2 parents 02f4db9 + fd1acc2 commit 4f16681
Show file tree
Hide file tree
Showing 452 changed files with 44,131 additions and 16,877 deletions.
62 changes: 62 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
ignorePatterns: [
"ui/",
'ui/**/*',
'dist/**/*',
],
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
root: true,
env: {
node: true,
jest: true,
},
rules: {
'quotes': ['error', 'single'],
'comma-dangle': ['error', 'only-multiline'],
'no-multiple-empty-lines': ['warn', { max: 1, maxEOF: 0 }],
'eol-last': ['error', 'always'],
'space-before-function-paren': ['error', { named: 'never' }],
'@typescript-eslint/lines-between-class-members': ['warn', 'always', { exceptAfterOverload: true, exceptAfterSingleLine: true }],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/semi': ['warn'],
'@typescript-eslint/member-delimiter-style': ['warn'],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none', vars: 'local', varsIgnorePattern: 'key' }],
},
overrides: [
{
files: [
'**/test/**/*.spec.{j,t}s?(x)',
'**/test/**/*.e2e-spec.{j,t}s?(x)',
],
plugins: [
'jest',
],
extends: [
'plugin:jest/recommended',
'plugin:jest/style',
],
rules: {
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none', vars: 'local', varsIgnorePattern: 'key|wrapper' }],
'jest/no-conditional-expect': ['off']
},
env: {
jest: true,
},
}
]
};
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# These are supported funding model platforms

github: oznu
custom: https://paypal.me/oznu
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bug Report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

<!-- You must use the issue template below when submitting a bug -->

**Describe The Bug:**
<!-- A clear and concise description of what the bug is. -->

**To Reproduce:**
<!-- Steps to reproduce the behavior. -->

**Expected behavior:**
<!-- A clear and concise description of what you expected to happen. -->

**Logs:**
<!-- Bug reports that do not contain logs may be closed without warning. -->

```
Show the Homebridge / Homebridge Config UI X logs here.
```

**Homebridge Config:**

```json
Show your homebridge config.json here
```

**Screenshots:**
<!-- If applicable, add screenshots to help explain your problem. -->

**Environment:**

* **Node.js Version**: <!-- node -v -->
* **NPM Version**: <!-- npm -v -->
* **Homebridge Version**: <!-- homebridge -V -->
* **Homebridge Config UI X Version**:
* **Operating System**: Raspbian / Ubuntu / Debian / Windows / macOS / Docker
* **Process Supervisor**: Docker / Systemd / init.d / pm2 / launchctl / hb-service / other / none


<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Homebridge Slack Community
url: https://slackin-znyruquwmv.now.sh/
about: Ask your questions in the ui channel
- name: Homebridge Discord Community
url: https://discord.gg/C87Pvq3
about: Join the Official Homebridge Discord community and ask in the ui channel.
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Stale Bot'
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: stale
exempt-issue-labels: pinned,security
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
days-before-issue-stale: 30
days-before-issue-close: 5
days-before-pr-close: -1
days-before-pr-stale: -1
64 changes: 64 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Test

on: [
pull_request,
push
]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x]
include:
- os: macos-latest
node-version: 14.x
- os: macos-latest
node-version: 15.x
- os: windows-latest
node-version: 14.x
- os: windows-latest
node-version: 15.x

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build:server
- run: npm run lint:server
- run: npm run test:e2e

# remove dev deps
- run: npm clean-install --production

# test hb-service
- run: node dist/bin/hb-service.js -v
- if: runner.os == 'Linux'
name: 'Run hb-service install (Linux)'
run: |
sudo npm link
sudo npm install -g homebridge
sudo hb-service install --user homebridge
sleep 30
- if: runner.os == 'macOS'
name: 'Run hb-service install (macOS)'
run: |
sudo npm link
sudo npm install -g homebridge
sudo hb-service install
sleep 30
- if: runner.os == 'Windows'
name: 'Run hb-service install (Windows)'
run: |
npm link
npm install -g homebridge
hb-service install
Start-Sleep -s 30
- name: 'Test hb-service install'
run: node dist/bin/hb-service.js status --port 8581

4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ lib
src
screenshots
tsconfig.json
tslint.json
yarn.lock
webpack.config.js
tsconfig.build.json
nodemon-debug.json
nodemon.json
nest-cli.json
.eslintrc.js
.prettierrc
.vscode
.github
scripts
test

# Logs
logs
Expand Down
22 changes: 20 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,25 @@
"editor.insertSpaces": true,
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.tslint": true
"source.fixAll.eslint": true
},
"editor.formatOnSave": true
"editor.formatOnSave": true,
"eslint.workingDirectories": [
".",
"./ui"
],
"eslint.options": {
"extensions": [
".js",
".ts",
".html"
]
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html"
],
}
Loading

0 comments on commit 4f16681

Please sign in to comment.