Skip to content

Commit

Permalink
Small fixes (#234)
Browse files Browse the repository at this point in the history
* Migrate to ESLint. Update Dependencies.

Signed-off-by: Jerome Luckenbach <github@luckenba.ch>

* Remove orga directory.

Signed-off-by: Jerome Luckenbach <github@luckenba.ch>

* Fix markdown errors.

Signed-off-by: Jerome Luckenbach <github@luckenba.ch>

* Update pipeline triggers.

Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
  • Loading branch information
Confectrician authored Jan 15, 2021
1 parent 8c11a32 commit 2dc028f
Show file tree
Hide file tree
Showing 9 changed files with 1,744 additions and 3,802 deletions.
5 changes: 2 additions & 3 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trigger:
branches:
include: ['*']
tags:
include: ['*']
exclude: ['*']

pr:
- master
Expand All @@ -24,13 +24,12 @@ pool:
steps:
# tag CI-produced packages with a version number pointing to the commit which was built.
# for PRs, also include the PR #.
# Temporary remove ci naming for non pr builds
- bash: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [ -n "$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER" ]; then
VERSION_STRING=${PACKAGE_VERSION}-pr-${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}-$(git rev-parse --short HEAD)
else
VERSION_STRING=${PACKAGE_VERSION}
VERSION_STRING=${PACKAGE_VERSION}-ci-$(git rev-parse --short HEAD)
fi
npm --no-git-tag-version version $VERSION_STRING
echo "##vso[build.updatebuildnumber]${VERSION_STRING}_${BUILD_BUILDID}"
Expand Down
7 changes: 5 additions & 2 deletions .azure-pipelines/release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
# https://github.com/microsoft/azure-pipelines-vscode
#
#
# Only trigger manually
trigger: none
# Only trigger on tag creation
trigger:
tags:
include: ['*']

pr: none

pool:
Expand Down
45 changes: 45 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
export default {
"env": {
"browser": true,
"node": true
},
"extends": [
"prettier",
"prettier/@typescript-eslint"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/member-delimiter-style": [
"off",
{
"multiline": {
"delimiter": "none",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/semi": [
"off",
null
],
"curly": "error",
"eqeqeq": [
"error",
"always"
],
"no-redeclare": "error"
}
};
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"ms-vscode.vscode-typescript-tslint-plugin",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"daghostman.vs-treeview"
]
}
17 changes: 8 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ We pass the function containing the implementation of the command as the second
- `meta` holds some metadata like the langauage definition that is needed for syntax highlighting

- `.azure-pipelines` holds the configuration we are using for our *continous integration*.
You can find our builds and artifacts on https://dev.azure.com/openhab/vscode-openhab/_build?definitionId=2
You can find our builds and artifacts on <https://dev.azure.com/openhab/vscode-openhab/_build?definitionId=2>

- `webpack`: We use webpack for bundling this extension. The config is shared over different locations. It has a shared part in the repository root which is then used by specific parts for each sub package. In this case `client` and `serverJS` have their own webpack config files.

Expand Down Expand Up @@ -68,9 +68,8 @@ You can find our builds and artifacts on https://dev.azure.com/openhab/vscode-op
- Press `F5` to run the tests in a new window with your extension loaded
- See the output of the test result in the debug console
- **TBD** Make changes to `test/extension.test.ts` or create new test files inside the `test` folder
- By convention, the test runner will only consider files matching the name pattern `**.test.ts`
- You can create folders inside the `test` folder to structure your tests any way you want

- By convention, the test runner will only consider files matching the name pattern `**.test.ts`
- You can create folders inside the `test` folder to structure your tests any way you want

## Contribution guidelines

Expand All @@ -97,13 +96,13 @@ This gives other contributors a chance to point you in the right
direction, give feedback on your design, and maybe point out if someone
else is working on the same thing.

### Create issues...
### Create issues

Any significant improvement should be documented as [a GitHub
issue](https://github.com/openhab/openhab-vscode/issues?labels=enhancement&page=1&state=open) before anybody
starts working on it.

### ...but check for existing issues first!
### ...but check for existing issues first

Please take a moment to check that an issue doesn't already exist
documenting your bug report or improvement proposal. If it does, it
Expand Down Expand Up @@ -171,7 +170,7 @@ pass it on as an open-source patch. The rules are pretty simple: if you
can certify the below (from
[developercertificate.org](http://developercertificate.org/)):

```
```text
Developer Certificate of Origin
Version 1.1
Expand Down Expand Up @@ -212,7 +211,7 @@ By making a contribution to this project, I certify that:

then you just add a line to every git commit message:

Signed-off-by: Joe Smith <joe.smith@email.com>
```Signed-off-by: Joe Smith <joe.smith@email.com>```

using your real name (sorry, no pseudonyms or anonymous contributions.)

Expand Down Expand Up @@ -276,4 +275,4 @@ The following icons were used from [Material Design Iconset](material.io/icons/)
| Player | `ic_play_circle_outline_black_24px` |
| Rollershutter | `ic_line_weight_black_24px` |
| Arrow | `arrow_right_alt` |
| HTTP | `http` |
| HTTP | `http` |
Loading

0 comments on commit 2dc028f

Please sign in to comment.