Skip to content

Commit

Permalink
Merge pull request #375 from keesschollaart81/dev
Browse files Browse the repository at this point in the history
v1.7.0 - From Frenck with love
  • Loading branch information
keesschollaart81 authored Jul 12, 2020
2 parents 3afa372 + 8c53cd5 commit 5391771
Show file tree
Hide file tree
Showing 61 changed files with 9,982 additions and 3,225 deletions.
45 changes: 45 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module.exports = {
root: true,
env: {
browser: false,
es2020: true,
},
extends: [
"airbnb-typescript/base",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:wc/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
project: "./tsconfig.json",
},
rules: {
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-misused-promises": 0, // This one really needs to go
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/restrict-template-expressions": 0,
"class-methods-use-this": 0,
"default-case": 0,
"import/no-cycle": 0,
"import/prefer-default-export": 0,
"no-console": 0,
"no-continue": 0,
"no-param-reassign": 0,
"no-restricted-syntax": ["error", "LabeledStatement", "WithStatement"],
"no-void": 0,
"prefer-destructuring": 0,
"vars-on-top": 0,
strict: 0,
},
};
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
target-branch: dev
assignees:
- keesschollaart81
80 changes: 41 additions & 39 deletions .github/workflows/github-actions-language-service.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
name: Language Sevice

on:
on:
push:
paths:
- 'src/language-service/*'
- '.github/*'
- "src/language-service/*"
- ".github/*"
pull_request:
paths:
- 'src/language-service/*'
- '.github/*'
- "src/language-service/*"
- ".github/*"

jobs:
language-service:
name: Language Service
runs-on: ubuntu-latest
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@master

- name: Use Node.js 12.x
uses: actions/setup-node@master
with:
node-version: 12.x

- name: NPM Install
working-directory: src/language-service
run: |
rm package-lock.json
npm install
- name: NPM Compile
working-directory: src/language-service
run: npm run compile

- name: Create .npmrc
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: NPM Publish to Registry
if: success() && github.ref == 'refs/heads/master'
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish src/language-service
- uses: actions/checkout@master

- name: Use Node.js 12.x
uses: actions/setup-node@master
with:
node-version: 12.x

- name: NPM Install
working-directory: src/language-service
run: |
rm package-lock.json
npm install
- name: NPM Lint
working-directory: src/language-service
run: npm run lint

- name: NPM Compile
working-directory: src/language-service
run: npm run compile

- name: Create .npmrc
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: NPM Publish to Registry
if: success() && github.ref == 'refs/heads/master'
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish src/language-service
# - name: NPM Publish to Registry
# uses: actions/npm@master
# uses: actions/npm@master
# if: success() && github.ref == 'refs/heads/master'
# env:
# NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# with:
# args: publish src/language-service
# args: publish src/language-service
47 changes: 25 additions & 22 deletions .github/workflows/github-actions-vscode-extension.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
name: VS Code Extension

on: [ push, pull_request]
on: [push, pull_request]

jobs:
vscode-extension:
name: VS Code Extension
runs-on: ubuntu-latest
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v1

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: NPM Install & Compile
run: |
npm install
npm run compile
- name: VS Marketplace Publish
if: success() && github.ref == 'refs/heads/master'
run: |
npm install -g vsce
vsce publish -p $VSCE_TOKEN
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
- uses: actions/checkout@v1

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: NPM Install & Compile
run: npm install

- name: NPM Lint
run: npm run lint

- name: NPM Compile
run: npm run compile

- name: VS Marketplace Publish
if: success() && github.ref == 'refs/heads/master'
run: |
npm install -g vsce
vsce publish -p $VSCE_TOKEN
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12.1
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vscode-test/
node_modules
out
src/language-service/dist
src/language-service/src/schemas/json
44 changes: 27 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</h1>

# Getting started

1. Install via the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=keesschollaart.vscode-home-assistant)

2. Open your (local copy of the) Home Assistant Configuration with VS Code

3. Configure the connection to Home Assistant via the HA Section in the VS Code Settings UI

More details in [the How-To in the Wiki](https://github.com/keesschollaart81/vscode-home-assistant/wiki/Configure-connection-to-HA)

4. Enjoy the features showcased below 👇
Expand All @@ -27,33 +27,45 @@

# Features

## Completion for Entity ID's & Services
## Completion for Entity IDs, Services, Scenes and Triggers

When connected with your Home Assistant server, entity id' and services will be auto-completed.
<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/entity_service_completion.gif" >

<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/entity_service_completion.gif">

## Completion & Validation for Configuration & Lovelace Schema

Most of the scheme's of Home Assistant will be validated and things like properties, values and enums will be auto-completed. This extension understands the behaviour of Home Assistant '!include...' behaviour and use this to provide scoped validation for all your files.

<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/schema_validation_completion.gif" >

<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/schema_validation_completion.gif">

Deprecation Warnings:

<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/deprecation-warnings.png">

Schema Documentation

<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/schema-documentation.png">

## Go to Definition for Includes

Easy navigate between your files references via the different !include... tags using 'f12' / 'Go to Definition'.
<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/go_to_definition.gif" >

<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/go_to_definition.gif">

## Snippets

Snippets allow you to create commonly used data structures very quickly.
Snippets allow you to create commonly used data structures very quickly.

<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/snippet.gif" >
<img src="https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/dev/assets/snippet.gif">

## Commands

Commands allow you to quickly interact with Home Assistant! Find them using Cmd+shift+P and type 'Home Assistant'

## Render templates
Evaluate jinja templates via Home Assistant's API and see how they would render.

![image](https://user-images.githubusercontent.com/6755359/69496084-6b089d80-0ece-11ea-8496-50251b91732f.png)

# Contribution
Expand All @@ -63,7 +75,7 @@ Commands allow you to quickly interact with Home Assistant! Find them using Cmd+

# Release Notes

Read all the recent changes in the [GitHub releases section](https://github.com/keesschollaart81/vscode-home-assistant/releases)
Read all the recent changes in the [GitHub releases section](https://github.com/keesschollaart81/vscode-home-assistant/releases)

# Feedback / Ideas

Expand All @@ -72,19 +84,17 @@ Create an [issue](https://github.com/keesschollaart81/vscode-home-assistant/issu
# Things to do / up for grabs

- [ ] Go to Definition for entities, scripts and automations
- [ ] Render Jinja2 template locally (like/via CLI?) in preview pane
- [ ] Autocomplete !secrets
- [ ] Autocomplete triggers
- [ ] Check local config with HA Server

# Build & Deployment status

| | Master | Dev |
|--------------------------------|-----------------|-----------------|
| Build status | [![Build Status](https://caseonline.visualstudio.com/vscode-home-assistant/_apis/build/status/keesschollaart81.vscode-home-assistant?branchName=master)](https://caseonline.visualstudio.com/vscode-home-assistant/_build/index?definitionId=23) | [![Build Status](https://caseonline.visualstudio.com/vscode-home-assistant/_apis/build/status/keesschollaart81.vscode-home-assistant?branchName=dev)](https://caseonline.visualstudio.com/vscode-home-assistant/_build/index?definitionId=23)
| Deployment Status | [![Deployment Status](https://caseonline.vsrm.visualstudio.com/_apis/public/Release/badge/b5e7419e-352f-433e-8690-463d52b2c4f7/1/2)](https://caseonline.visualstudio.com/vscode-home-assistant/_releases2?definitionId=1) |[![Deployment Status](https://caseonline.vsrm.visualstudio.com/_apis/public/Release/badge/b5e7419e-352f-433e-8690-463d52b2c4f7/1/1)](https://caseonline.visualstudio.com/vscode-home-assistant/_releases2?definitionId=1)|
| Get it | [![Marketplace Version](https://vsmarketplacebadge.apphb.com/version/keesschollaart.vscode-home-assistant.svg "Current Release")](https://marketplace.visualstudio.com/items?itemName=keesschollaart.vscode-home-assistant) | [![GitHub release](https://img.shields.io/github/release-pre/keesschollaart81/vscode-home-assistant.svg)](https://github.com/keesschollaart81/vscode-home-assistant/releases)|
| Deployment Status | [![Deployment Status](https://caseonline.vsrm.visualstudio.com/_apis/public/Release/badge/b5e7419e-352f-433e-8690-463d52b2c4f7/1/2)](https://caseonline.visualstudio.com/vscode-home-assistant/_releases2?definitionId=1) |[![Deployment Status](https://caseonline.vsrm.visualstudio.com/_apis/public/Release/badge/b5e7419e-352f-433e-8690-463d52b2c4f7/1/1)](https://caseonline.visualstudio.com/vscode-home-assistant/_releases2?definitionId=1)|
| Get it | [![Marketplace Version](https://vsmarketplacebadge.apphb.com/version/keesschollaart.vscode-home-assistant.svg "Current Release")](https://marketplace.visualstudio.com/items?itemName=keesschollaart.vscode-home-assistant) | [![GitHub release](https://img.shields.io/github/release-pre/keesschollaart81/vscode-home-assistant.svg)](https://github.com/keesschollaart81/vscode-home-assistant/releases)|

# Telemetry

This extension collects telemetry data to help us build a better experience for
Expand Down
Binary file added assets/deprecation-warnings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/entity_service_completion.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/schema-documentation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5391771

Please sign in to comment.