Skip to content

Commit bcc4b7c

Browse files
authored
Merge pull request #158 from sviete/beta
20210809.0
2 parents 56913a1 + 110891f commit bcc4b7c

File tree

396 files changed

+29755
-19688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

396 files changed

+29755
-19688
lines changed

.eslintrc.json

Lines changed: 52 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -35,55 +35,51 @@
3535
"es6": true
3636
},
3737
"rules": {
38-
"class-methods-use-this": 0,
39-
"new-cap": 0,
40-
"prefer-template": 0,
41-
"object-shorthand": 0,
42-
"func-names": 0,
43-
"prefer-arrow-callback": 0,
44-
"no-underscore-dangle": 0,
45-
"strict": 0,
46-
"prefer-spread": 0,
47-
"no-plusplus": 0,
48-
"no-bitwise": 2,
49-
"comma-dangle": 0,
50-
"vars-on-top": 0,
51-
"no-continue": 0,
52-
"no-param-reassign": 0,
53-
"no-multi-assign": 0,
54-
"no-console": 2,
55-
"radix": 0,
56-
"no-alert": 0,
57-
"no-return-await": 0,
58-
"no-nested-ternary": 0,
59-
"prefer-destructuring": 0,
38+
"class-methods-use-this": "off",
39+
"new-cap": "off",
40+
"prefer-template": "off",
41+
"object-shorthand": "off",
42+
"func-names": "off",
43+
"no-underscore-dangle": "off",
44+
"strict": "off",
45+
"no-plusplus": "off",
46+
"no-bitwise": "error",
47+
"comma-dangle": "off",
48+
"vars-on-top": "off",
49+
"no-continue": "off",
50+
"no-param-reassign": "off",
51+
"no-multi-assign": "off",
52+
"no-console": "error",
53+
"radix": "off",
54+
"no-alert": "off",
55+
"no-nested-ternary": "off",
56+
"prefer-destructuring": "off",
6057
"no-restricted-globals": [2, "event"],
61-
"prefer-promise-reject-errors": 0,
62-
"import/order": 0,
63-
"import/prefer-default-export": 0,
64-
"import/no-unresolved": 0,
65-
"import/no-cycle": 0,
58+
"prefer-promise-reject-errors": "off",
59+
"import/prefer-default-export": "off",
60+
"import/no-default-export": "off",
61+
"import/no-unresolved": "off",
62+
"import/no-cycle": "off",
6663
"import/extensions": [
67-
2,
64+
"error",
6865
"ignorePackages",
6966
{ "ts": "never", "js": "never" }
7067
],
7168
"no-restricted-syntax": ["error", "LabeledStatement", "WithStatement"],
72-
"object-curly-newline": 0,
73-
"default-case": 0,
74-
"wc/no-self-class": 0,
75-
"no-shadow": 0,
76-
"@typescript-eslint/camelcase": 0,
77-
"@typescript-eslint/ban-ts-comment": 0,
78-
"@typescript-eslint/no-use-before-define": 0,
79-
"@typescript-eslint/no-non-null-assertion": 0,
80-
"@typescript-eslint/no-explicit-any": 0,
81-
"@typescript-eslint/no-unused-vars": 0,
82-
"@typescript-eslint/explicit-function-return-type": 0,
83-
"@typescript-eslint/explicit-module-boundary-types": 0,
69+
"object-curly-newline": "off",
70+
"default-case": "off",
71+
"wc/no-self-class": "off",
72+
"no-shadow": "off",
73+
"@typescript-eslint/camelcase": "off",
74+
"@typescript-eslint/ban-ts-comment": "off",
75+
"@typescript-eslint/no-use-before-define": "off",
76+
"@typescript-eslint/no-non-null-assertion": "off",
77+
"@typescript-eslint/no-explicit-any": "off",
78+
"@typescript-eslint/explicit-function-return-type": "off",
79+
"@typescript-eslint/explicit-module-boundary-types": "off",
8480
"@typescript-eslint/no-shadow": ["error"],
8581
"@typescript-eslint/naming-convention": [
86-
0,
82+
"off",
8783
{
8884
"selector": "default",
8985
"format": ["camelCase", "snake_case"],
@@ -101,9 +97,20 @@
10197
"format": ["PascalCase"]
10298
}
10399
],
104-
"lit/attribute-value-entities": 0
100+
"@typescript-eslint/no-unused-vars": "off",
101+
"unused-imports/no-unused-vars": [
102+
"error",
103+
{
104+
"vars": "all",
105+
"varsIgnorePattern": "^_",
106+
"args": "after-used",
107+
"argsIgnorePattern": "^_",
108+
"ignoreRestSiblings": true
109+
}
110+
],
111+
"unused-imports/no-unused-imports": "error",
112+
"lit/attribute-value-entities": "off"
105113
},
106-
"plugins": ["disable", "import", "lit", "prettier", "@typescript-eslint"],
107-
"processor": "disable/disable",
108-
"ignorePatterns": ["src/resources/lit-virtualizer/*"]
114+
"plugins": ["disable", "unused-imports"],
115+
"processor": "disable/disable"
109116
}

.github/workflows/ci.yaml

Lines changed: 23 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,21 @@ on:
1010
- dev
1111
- master
1212

13+
env:
14+
NODE_VERSION: 14
15+
NODE_OPTIONS: --max_old_space_size=4096
16+
1317
jobs:
1418
lint:
1519
runs-on: ubuntu-latest
1620
steps:
1721
- name: Check out files from GitHub
1822
uses: actions/checkout@v2
19-
- name: Setting up Node.js
20-
uses: actions/setup-node@v1
21-
with:
22-
node-version: 12.x
23-
- name: Get yarn cache path
24-
id: yarn-cache-dir-path
25-
run: echo "::set-output name=dir::$(yarn cache dir)"
26-
- name: Fetching Yarn cache
27-
uses: actions/cache@v1
23+
- name: Set up Node ${{ env.NODE_VERSION }}
24+
uses: actions/setup-node@v2
2825
with:
29-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31-
restore-keys: |
32-
${{ runner.os }}-yarn-
26+
node-version: ${{ env.NODE_VERSION }}
27+
cache: yarn
3328
- name: Install dependencies
3429
run: yarn install
3530
env:
@@ -42,51 +37,35 @@ jobs:
4237
run: yarn run lint:types
4338
- name: Run prettier
4439
run: yarn run lint:prettier
40+
- name: Check for duplicate dependencies
41+
run: yarn dedupe --check
4542
test:
4643
runs-on: ubuntu-latest
4744
steps:
4845
- name: Check out files from GitHub
4946
uses: actions/checkout@v2
50-
- name: Setting up Node.js
51-
uses: actions/setup-node@v1
52-
with:
53-
node-version: 12.x
54-
- name: Get yarn cache path
55-
id: yarn-cache-dir-path
56-
run: echo "::set-output name=dir::$(yarn cache dir)"
57-
- name: Fetching Yarn cache
58-
uses: actions/cache@v1
47+
- name: Set up Node ${{ env.NODE_VERSION }}
48+
uses: actions/setup-node@v2
5949
with:
60-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
61-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
62-
restore-keys: |
63-
${{ runner.os }}-yarn-
50+
node-version: ${{ env.NODE_VERSION }}
51+
cache: yarn
6452
- name: Install dependencies
6553
run: yarn install
6654
env:
6755
CI: true
6856
- name: Run Mocha
69-
run: npm run mocha
57+
run: yarn run mocha
7058
build:
7159
runs-on: ubuntu-latest
7260
needs: [lint, test]
7361
steps:
7462
- name: Check out files from GitHub
7563
uses: actions/checkout@v2
76-
- name: Setting up Node.js
77-
uses: actions/setup-node@v1
64+
- name: Set up Node ${{ env.NODE_VERSION }}
65+
uses: actions/setup-node@v2
7866
with:
79-
node-version: 12.x
80-
- name: Get yarn cache path
81-
id: yarn-cache-dir-path
82-
run: echo "::set-output name=dir::$(yarn cache dir)"
83-
- name: Fetching Yarn cache
84-
uses: actions/cache@v1
85-
with:
86-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
87-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
88-
restore-keys: |
89-
${{ runner.os }}-yarn-
67+
node-version: ${{ env.NODE_VERSION }}
68+
cache: yarn
9069
- name: Install dependencies
9170
run: yarn install
9271
env:
@@ -101,20 +80,11 @@ jobs:
10180
steps:
10281
- name: Check out files from GitHub
10382
uses: actions/checkout@v2
104-
- name: Setting up Node.js
105-
uses: actions/setup-node@v1
106-
with:
107-
node-version: 12.x
108-
- name: Get yarn cache path
109-
id: yarn-cache-dir-path
110-
run: echo "::set-output name=dir::$(yarn cache dir)"
111-
- name: Fetching Yarn cache
112-
uses: actions/cache@v1
83+
- name: Set up Node ${{ env.NODE_VERSION }}
84+
uses: actions/setup-node@v2
11385
with:
114-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
115-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
116-
restore-keys: |
117-
${{ runner.os }}-yarn-
86+
node-version: ${{ env.NODE_VERSION }}
87+
cache: yarn
11888
- name: Install dependencies
11989
run: yarn install
12090
env:

.github/workflows/demo.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,23 @@ name: Demo
33
on:
44
push:
55
branches:
6-
- master
6+
- dev
7+
8+
env:
9+
NODE_VERSION: 14
10+
NODE_OPTIONS: --max_old_space_size=4096
11+
712
jobs:
813
deploy:
914
runs-on: ubuntu-latest
1015
steps:
1116
- name: Check out files from GitHub
1217
uses: actions/checkout@v2
13-
- name: Setting up Node.js
14-
uses: actions/setup-node@v1
15-
with:
16-
node-version: 12.x
17-
- name: Get yarn cache path
18-
id: yarn-cache-dir-path
19-
run: echo "::set-output name=dir::$(yarn cache dir)"
20-
- name: Fetching Yarn cache
21-
uses: actions/cache@v1
18+
- name: Set up Node ${{ env.NODE_VERSION }}
19+
uses: actions/setup-node@v2
2220
with:
23-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
24-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
25-
restore-keys: |
26-
${{ runner.os }}-yarn-
21+
node-version: ${{ env.NODE_VERSION }}
22+
cache: yarn
2723
- name: Install dependencies
2824
run: yarn install
2925
env:

.github/workflows/release.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77

88
env:
99
PYTHON_VERSION: 3.8
10-
NODE_VERSION: 12.1
10+
NODE_VERSION: 14
11+
NODE_OPTIONS: --max_old_space_size=4096
1112

1213
jobs:
1314
release:
@@ -29,7 +30,15 @@ jobs:
2930
uses: actions/setup-node@v2
3031
with:
3132
node-version: ${{ env.NODE_VERSION }}
33+
cache: yarn
3234

35+
- name: Install dependencies
36+
run: yarn install
37+
38+
- name: Download Translations
39+
run: ./script/translations_download
40+
env:
41+
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
3342
- name: Build and release package
3443
run: |
3544
python3 -m pip install twine
Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
name: Translations
22

33
on:
4-
schedule:
5-
- cron: "30 0 * * *"
64
push:
75
branches:
86
- dev
97
paths:
108
- src/translations/en.json
119

1210
env:
13-
NODE_VERSION: 12
11+
NODE_VERSION: 14
1412

1513
jobs:
1614
upload:
@@ -20,46 +18,8 @@ jobs:
2018
- name: Checkout the repository
2119
uses: actions/checkout@v2
2220

23-
- name: Set up Node ${{ env.NODE_VERSION }}
24-
uses: actions/setup-node@v2
25-
with:
26-
node-version: ${{ env.NODE_VERSION }}
27-
2821
- name: Upload Translations
2922
run: |
3023
export LOKALISE_TOKEN="${{ secrets.LOKALISE_TOKEN }}"
3124
3225
./script/translations_upload_base
33-
34-
download:
35-
name: Download
36-
needs: upload
37-
if: github.event_name == 'schedule'
38-
runs-on: ubuntu-latest
39-
steps:
40-
- name: Checkout the repository
41-
uses: actions/checkout@v2
42-
43-
- name: Set up Node ${{ env.NODE_VERSION }}
44-
uses: actions/setup-node@v2
45-
with:
46-
node-version: ${{ env.NODE_VERSION }}
47-
48-
- name: Download Translations
49-
run: |
50-
export LOKALISE_TOKEN="${{ secrets.LOKALISE_TOKEN }}"
51-
52-
npm install
53-
./script/translations_download
54-
55-
- name: Initialize git
56-
uses: home-assistant/actions/helpers/git-init@master
57-
with:
58-
name: GitHub Action
59-
email: github-action@users.noreply.github.com
60-
61-
- name: Update translation
62-
run: |
63-
git add translations
64-
git commit -am "Translation update"
65-
git push

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@ hass_frontend/*
88
dist
99

1010
# yarn
11-
.yarn
12-
yarn-error.log
11+
.yarn/*
12+
!.yarn/patches
13+
!.yarn/releases
14+
!.yarn/plugins
15+
!.yarn/sdks
16+
!.yarn/versions
17+
.pnp.*
1318
node_modules/*
19+
yarn-error.log
1420
npm-debug.log
1521

1622
# Python stuff

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12.1
1+
14

0 commit comments

Comments
 (0)