Skip to content

Commit

Permalink
Dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
klein0r committed May 16, 2023
1 parent 4304021 commit 3a86ff8
Show file tree
Hide file tree
Showing 16 changed files with 242 additions and 177 deletions.
39 changes: 10 additions & 29 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,19 @@
"node": true,
"mocha": true
},
"extends": ["eslint:recommended"],
"plugins": [],
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
"rules": {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"no-console": "off",
"no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
],
"no-var": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": ["error", "always"]
"prefer-const": "error"
},
"parserOptions": {
"ecmaVersion": 2020
"ecmaVersion": 2020,
"ecmaFeatures": {
"jsx": true
}
}
}
}
32 changes: 0 additions & 32 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

79 changes: 79 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Bug report
title: "Bug report"
description: "Create a report to help improve this ioBroker adapter"
labels: bug
body:
- type: markdown
attributes:
value: >
**Thank you for wanting to report a bug in this adapter!**
If this is the first time you are doing this, please take a few moments to read
through the [README](https://github.com/klein0r/ioBroker.awtrix-light/blob/master/README.md).
You are about to report a bug in **Awtrix Light Adapter**. Do not proceed if your issues
occurs with ioBroker, any third party adapters, unofficial or outdated
adapter versions.
Do also not seek support here ("I need help with ...", "I have a
question ...", "Can someone walk me through ..."), that belongs into the
[ioBroker forum at forum.iobroker.net](https://forum.iobroker.net/).
And finally, make sure any bug you want to report is still present with the **current**
adapter (beta) version.
Thank you for your collaboration!
- type: textarea
attributes:
label: The problem
description: >-
Describe the issue you are experiencing here. Tell us what you were trying to do
step by step, and what happened that you did not expect.
Provide a clear and concise description of what the problem is and include as many
details as possible.
validations:
required: true
- type: markdown
attributes:
value: |
## Environment
- type: input
attributes:
label: Version of nodejs
description: Can be found in the host section of ioBroker admin
validations:
required: true
- type: input
attributes:
label: Version of ioBroker js-controller
description: Can be found in the host section of ioBroker admin
validations:
required: true
- type: input
attributes:
label: Version of Adapter
description: Can be found in the adapters tab of ioBroker admin
validations:
required: true
- type: input
attributes:
label: Operating system running ioBroker
description: >-
Linux, Windows, MacOS, something else? With version please?
validations:
required: true
- type: markdown
attributes:
value: |
## Logs and other files needed for analysis
- type: checkboxes
attributes:
label: Checklist of files to include below
options:
- label: iobroker.current.log (Please share the logs in debug mode)
required: true
- label: Contents of the JavaScript browser console (always include in cases of issues with the user interface)
- type: textarea
attributes:
label: Additional information & file uploads
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
6 changes: 1 addition & 5 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Check if PR should be auto-merged
uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
# In order to use this, you need to go to https://github.com/settings/tokens and
# create a Personal Access Token with the permission "public_repo".
# Enter this token in your repository settings under "Secrets" and name it AUTO_MERGE_TOKEN
github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
# By default, squash and merge, so Github chooses nice commit messages
command: squash and merge
72 changes: 28 additions & 44 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ jobs:
steps:
- uses: ioBroker/testing-action-check@v1
with:
node-version: '16.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
node-version: "16.x"
lint: true
lint-command: "npm run lint ."

# Runs adapter tests on all supported node versions and OSes
adapter-tests:
if: contains(github.event.head_commit.message, '[skip ci]') == false

Expand All @@ -48,45 +46,31 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
extra-tests: npm run test:js

# TODO: To enable automatic npm releases, create a token on npmjs.org
# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
# Then uncomment the following block:
deploy:
needs: [check-and-lint, adapter-tests]

# # Deploys the final package to NPM
# deploy:
# needs: [check-and-lint, adapter-tests]
#
# # Trigger this step only when a commit on any branch is tagged with a version number
# if: |
# contains(github.event.head_commit.message, '[skip ci]') == false &&
# github.event_name == 'push' &&
# startsWith(github.ref, 'refs/tags/v')
#
# runs-on: ubuntu-latest
#
# # Write permissions are required to create Github releases
# permissions:
# contents: write
#
# steps:
# - uses: ioBroker/testing-action-deploy@v1
# with:
# node-version: '16.x'
# # Uncomment the following line if your adapter cannot be installed using 'npm ci'
# # install-command: 'npm install'
# npm-token: ${{ secrets.NPM_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
#
# # When using Sentry for error reporting, Sentry can be informed about new releases
# # To enable create a API-Token in Sentry (User settings, API keys)
# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options
# # Then uncomment and customize the following block:
# sentry: true
# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
# sentry-project: "iobroker-awtrix-light"
# sentry-version-prefix: "iobroker.awtrix-light"
# # If your sentry project is linked to a GitHub repository, you can enable the following option
# # sentry-github-integration: true
if: |
contains(github.event.head_commit.message, '[skip ci]') == false &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

steps:
- uses: ioBroker/testing-action-deploy@v1
with:
node-version: "16.x"
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}

# When using Sentry for error reporting, Sentry can be informed about new releases
# To enable create a API-Token in Sentry (User settings, API keys)
# Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options
# Then uncomment and customize the following block:
sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
sentry-project: "iobroker-awtrix-light"
sentry-version-prefix: "iobroker.awtrix-light"
# If your sentry project is linked to a GitHub repository, you can enable the following option
# sentry-github-integration: true
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# No dot-directories except github/vscode
.*/
!.vscode/
!.github/

.git
.idea
*.code-workspace
node_modules
nbproject
Expand All @@ -14,4 +11,7 @@ Thumbs.db

# i18n intermediate files
admin/i18n/flat.txt
admin/i18n/*/flat.txt
admin/i18n/*/flat.txt

# ioBroker dev-server
.dev-server/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
6 changes: 5 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
package.json
package-lock.json
package-lock.json
README.md
io-package.json
docs/**
.github/**
9 changes: 0 additions & 9 deletions .prettierrc.js

This file was deleted.

9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 200,
"useTabs": false,
"tabWidth": 4,
"endOfLine": "lf"
}
7 changes: 5 additions & 2 deletions .releaseconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"plugins": ["iobroker", "license", "manual-review"]
}
"plugins": [
"iobroker",
"license"
]
}
Loading

0 comments on commit 3a86ff8

Please sign in to comment.