Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 42 additions & 48 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,50 +1,44 @@
module.exports = {
env: {
browser: true,
node: true
},
extends: [
'prettier',
'prettier/@typescript-eslint'
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module'
},
plugins: ['@typescript-eslint'],
rules: {
'no-restricted-syntax': [
'warn',
{
selector: 'AwaitExpression',
message: 'Use Promise chains (.then/.catch) instead of async/await'
}
],
// Disabled due to existing violations. See issue #334
curly: 'off',
eqeqeq: 'off',
'no-redeclare': 'error'
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
parserOptions: {
project: ['tsconfig.json', 'client/tsconfig.json', 'client/tsconfig.test.json'],
tsconfigRootDir: __dirname
},
rules: {
'@typescript-eslint/member-delimiter-style': [
'off',
{
multiline: { delimiter: 'none', requireLast: true },
singleline: { delimiter: 'semi', requireLast: false }
}
env: {
browser: true,
node: true,
},
extends: ['prettier', 'prettier/@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
'no-restricted-syntax': [
'warn',
{
selector: 'AwaitExpression',
message: 'Use Promise chains (.then/.catch) instead of async/await',
},
],
// Disabled due to existing violations. See issue #334
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/semi': ['off', null]
}
}
]
};
'no-redeclare': 'error',
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
parserOptions: {
project: ['tsconfig.json', 'client/tsconfig.json', 'client/tsconfig.test.json'],
tsconfigRootDir: __dirname,
},
rules: {
'@typescript-eslint/member-delimiter-style': [
'off',
{
multiline: { delimiter: 'none', requireLast: true },
singleline: { delimiter: 'semi', requireLast: false },
},
],
// Disabled due to existing violations. See issue #334
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/semi': ['off', null],
},
},
],
}
21 changes: 14 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,50 @@ about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

<!--
Provide a general summary of the issue in the *Title* above
Provide a general summary of the issue in the *Title* above

Important: Please contact the openHAB community forum for questions or
Important: Please contact the openHAB community forum for questions or
for configuration and usage guidance: https://community.openhab.org/c/apps-services/vs-code

Feel free to delete any comment lines in the template (starting with "<!--")
Feel free to delete any comment lines in the template (starting with "<!--")

-->

## Expected Behavior

<!-- Tell us what should happen, if the extension worked as you expected. -->

## Current Behavior

<!-- Tell us what happens instead of the expected behavior.
Include related log information (preferably debug level) and related configs.
Use file attachment for log and config information longer than a few lines -->

## Possible Solution

<!-- Not obligatory, but suggest a fix/reason for the bug, -->
<!-- or ideas how to implement the addition or change -->

## Steps to Reproduce (for Bugs)

<!-- Provide a link to a live example, or an unambiguous set of steps to -->
<!-- reproduce this bug. Include code to reproduce, if relevant -->

1.
2.

## Context

<!-- How has this issue affected you? What are you trying to accomplish? -->
<!-- Providing context helps us come up with a solution that is most useful in the real world -->

## Your Environment

<!-- Include as many relevant details about the environment you experienced the bug in -->
* Version used: (e.g., openHAB, vscode and extension versions)
* Environment name and version (e.g. Chrome 39, node.js 5.4, Java 8, ...):
* Operating System and version (desktop or mobile, Windows 10, Raspbian Jessie, ...):

- Version used: (e.g., openHAB, vscode and extension versions)
- Environment name and version (e.g. Chrome 39, node.js 5.4, Java 8, ...):
- Operating System and version (desktop or mobile, Windows 10, Raspbian Jessie, ...):
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,29 @@ about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

<!--
A clear and concise description of what the problem is.
Example: I'm always frustrated when [...]
-->

**Describe the solution you'd like**

<!--
A clear and concise description of what you want to happen.
-->

**Describe alternatives you've considered**

<!--
A clear and concise description of any alternative solutions or features you've considered.
-->

**Additional context**

<!--
Add any other context or screenshots about the feature request here.
Maybe ther is already some discussion ongoing in the comunity forum.
Expand Down
12 changes: 12 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,15 @@ Preferred commands:
- `gh pr list` — list PRs

Never open a browser page to a GitHub issue or pull request URL to read or edit it.

## Creating Cross-Fork Pull Requests

This repo's branches follow the pattern `pgfeller/issue<N>` (branch name contains a slash).
When creating a PR from fork `pgfeller/openhab-vscode` into `openhab/openhab-vscode`, use
`owner:branch` format for `--head` — never `owner/branch`:

```bash
gh pr create --draft --repo openhab/openhab-vscode --base main --head pgfeller:pgfeller/issue334 --title "..." --body "..."
```

See the global `github-pr-cli.instructions.md` for the general rule and rationale.
20 changes: 10 additions & 10 deletions .github/hooks/block-github-browser.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"hooks": {
"PreToolUse": [
{
"type": "command",
"command": ".github/hooks/block-github-browser.sh",
"timeout": 5
}
]
}
}
"hooks": {
"PreToolUse": [
{
"type": "command",
"command": ".github/hooks/block-github-browser.sh",
"timeout": 5
}
]
}
}
140 changes: 86 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,94 @@
name: CI

on:
push:
branches: [main]
push:
branches: [main]

paths-ignore:
- "docs/**"
- ".vscode/**"
- ".azure-pipelines/**"
paths-ignore:
- 'docs/**'
- '.vscode/**'
- '.azure-pipelines/**'

pull_request:
branches: [main]
pull_request:
branches: [main]

paths-ignore:
- "docs/**"
- ".vscode/**"
- ".azure-pipelines/**"
paths-ignore:
- 'docs/**'
- '.vscode/**'
- '.azure-pipelines/**'

jobs:
build:
# Run the CI build for all relevant systems
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- run: npm install

- run: xvfb-run -a npm test
if: runner.os == 'Linux'

- run: npm test
if: runner.os != 'Linux'

package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- run: npm install

- name: compile and create vsix
run: npm run package

- name: print vsix path
run: |
echo "VSIX Path: ${{ env.vsix_path }}"
build:
# Run the CI build for all relevant systems
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- run: npm install

- run: xvfb-run -a npm test
if: runner.os == 'Linux'

- run: npm test
if: runner.os != 'Linux'

package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- run: npm install

- name: compile and create vsix
run: npm run package

- name: print vsix path
run: |
echo "VSIX Path: ${{ env.vsix_path }}"

format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- run: npm install

- name: Check formatting
run: npm run format:check

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- run: npm install

- name: Run ESLint
run: npm run lint
Loading
Loading