Skip to content

Commit f89e65d

Browse files
committed
Implement prettier (automatic changes)
1 parent c4371b9 commit f89e65d

File tree

146 files changed

+4559
-4038
lines changed

Some content is hidden

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

146 files changed

+4559
-4038
lines changed

.devcontainer/devcontainer.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"image": "mcr.microsoft.com/devcontainers/javascript-node:18",
2+
"image": "mcr.microsoft.com/devcontainers/javascript-node:18",
33

4-
"postCreateCommand": "npm install",
4+
"postCreateCommand": "npm install",
55

6-
"portsAttributes": {
7-
"8080": {
8-
"label": "client"
6+
"portsAttributes": {
7+
"8080": {
8+
"label": "client"
9+
}
910
}
10-
}
1111
}

.github/dependabot.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
5-
schedule:
6-
interval: "daily"
3+
- package-ecosystem: 'github-actions'
4+
directory: '/'
5+
schedule:
6+
interval: 'daily'

.github/workflows/build-deploy.yml

+39-39
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,55 @@ name: Build ⚙ and Deploy 🚀
33
on: [push, pull_request]
44

55
concurrency:
6-
group: ${{ github.ref }}
6+
group: ${{ github.ref }}
77

88
jobs:
9-
build_and_deploy:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout 🚚
13-
uses: actions/checkout@v4
9+
build_and_deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout 🚚
13+
uses: actions/checkout@v4
1414

15-
- name: Setup pnpm ⚗
16-
uses: pnpm/action-setup@v4
17-
with:
18-
version: 9
15+
- name: Setup pnpm ⚗
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: 9
1919

20-
- name: Setup Node.js ⚗
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: 20
24-
cache: pnpm
20+
- name: Setup Node.js ⚗
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: pnpm
2525

26-
- name: Install dependencies 🌐
27-
run: pnpm install --frozen-lockfile
26+
- name: Install dependencies 🌐
27+
run: pnpm install --frozen-lockfile
2828

29-
- name: Lint
30-
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
31-
run: pnpm run pretty:check
29+
- name: Lint
30+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
31+
run: pnpm run pretty:check
3232

33-
- name: Build 🛠
34-
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
35-
run: pnpm run build
33+
- name: Build 🛠
34+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
35+
run: pnpm run build
3636

37-
- name: Run tests 🩺
38-
run: pnpm run test
37+
- name: Run tests 🩺
38+
run: pnpm run test
3939

40-
- name: Add build.txt 🗓
41-
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
42-
run: |
43-
git log --pretty=format:'%h' -n 1 > dist/build.txt
44-
echo >> dist/build.txt
45-
date +%F_%T >> dist/build.txt
40+
- name: Add build.txt 🗓
41+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
42+
run: |
43+
git log --pretty=format:'%h' -n 1 > dist/build.txt
44+
echo >> dist/build.txt
45+
date +%F_%T >> dist/build.txt
4646
47-
- name: Deploy 🚀
48-
if: github.ref == 'refs/heads/master'
49-
uses: JamesIves/[email protected]
50-
with:
51-
branch: gh-pages # The branch the action should deploy to.
52-
folder: dist # The folder the action should deploy.
53-
single-commit: true
54-
clean: true
47+
- name: Deploy 🚀
48+
if: github.ref == 'refs/heads/master'
49+
uses: JamesIves/[email protected]
50+
with:
51+
branch: gh-pages # The branch the action should deploy to.
52+
folder: dist # The folder the action should deploy.
53+
single-commit: true
54+
clean: true
5555
# clean-exclude: |
5656
# develop
5757

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
name: Merge master to develop
22

33
on:
4-
push:
5-
branches:
6-
- master
4+
push:
5+
branches:
6+
- master
77

88
jobs:
9-
merge_master_to_dev:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v4
13-
- name: Merge master -> develop
14-
uses: devmasx/merge-branch@master
15-
with:
16-
type: now
17-
head_to_merge: master
18-
target_branch: develop
19-
github_token: ${{ github.token }}
9+
merge_master_to_dev:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Merge master -> develop
14+
uses: devmasx/merge-branch@master
15+
with:
16+
type: now
17+
head_to_merge: master
18+
target_branch: develop
19+
github_token: ${{ github.token }}

.github/workflows/stale.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: "Close stale issues/pull requests"
1+
name: 'Close stale issues/pull requests'
22
on:
3-
schedule:
4-
- cron: "0 0 * * *"
3+
schedule:
4+
- cron: '0 0 * * *'
55

66
jobs:
7-
stale:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/stale@v9
11-
with:
12-
repo-token: ${{ secrets.GITHUB_TOKEN }}
13-
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days'
14-
stale-pr-message: 'This pull request is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days'
15-
days-before-stale: 180
16-
days-before-close: 30
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v9
11+
with:
12+
repo-token: ${{ secrets.GITHUB_TOKEN }}
13+
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days'
14+
stale-pr-message: 'This pull request is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days'
15+
days-before-stale: 180
16+
days-before-close: 30

.github/workflows/update-algolia-index.yml

+61-61
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,71 @@ name: Update Algolia-Search index
22

33
# Only trigger, when the build workflow succeeded on branch master
44
on:
5-
workflow_run:
6-
workflows: [ "Build ⚙ and Deploy 🚀" ]
7-
branches: [ master ]
8-
types: [ completed ]
5+
workflow_run:
6+
workflows: ['Build ⚙ and Deploy 🚀']
7+
branches: [master]
8+
types: [completed]
99

1010
concurrency:
11-
group: algolia-update
12-
cancel-in-progress: true
11+
group: algolia-update
12+
cancel-in-progress: true
1313

1414
jobs:
15-
update-algolia-index:
16-
runs-on: ubuntu-latest
17-
steps:
18-
# Try to workaround time gap between newly gh-pages deployment is available (cache cleared?)
19-
- name: Wait for deployment is published
20-
run: |
21-
CNT=1
22-
echo Waiting for deployment ${GITHUB_SHA:0:7} is published
23-
sleep 60
24-
while ! curl -sS https://www.zigbee2mqtt.io/build.txt | grep -qF ${GITHUB_SHA:0:7} ; do
25-
CNT=$((CNT+1))
26-
sleep 1
27-
if [ $CNT -gt 300 ]; then
28-
>&2 echo "build.txt does not match current commit"
29-
>&2 curl -sS https://www.zigbee2mqtt.io/build.txt
30-
exit 1
31-
fi
32-
done
15+
update-algolia-index:
16+
runs-on: ubuntu-latest
17+
steps:
18+
# Try to workaround time gap between newly gh-pages deployment is available (cache cleared?)
19+
- name: Wait for deployment is published
20+
run: |
21+
CNT=1
22+
echo Waiting for deployment ${GITHUB_SHA:0:7} is published
23+
sleep 60
24+
while ! curl -sS https://www.zigbee2mqtt.io/build.txt | grep -qF ${GITHUB_SHA:0:7} ; do
25+
CNT=$((CNT+1))
26+
sleep 1
27+
if [ $CNT -gt 300 ]; then
28+
>&2 echo "build.txt does not match current commit"
29+
>&2 curl -sS https://www.zigbee2mqtt.io/build.txt
30+
exit 1
31+
fi
32+
done
3333
34-
- name: Create algolia scraper config
35-
run: |
36-
cat << EOF > algolia.json
37-
{
38-
"index_name": "zigbee2mqtt.io",
39-
"sitemap_urls": ["https://www.zigbee2mqtt.io/sitemap.xml"],
40-
"stop_urls": [],
41-
"selectors": {
42-
"lvl0": {
43-
"selector": "header .router-link-active",
44-
"global": true,
45-
"default_value": "Miscellaneous"
46-
},
47-
"lvl1": ".content-page h1, .device-page h1",
48-
"lvl2": ".content-page h2, .device-page h1 + table tbody tr:nth-child(3) td:nth-child(2)",
49-
"lvl3": ".content-page h3",
50-
"lvl4": ".content-page h4",
51-
"lvl5": ".content-page h5",
52-
"text": ".content-page p, .content-page li, .content-page code, .content-page td",
53-
"lang": {
54-
"selector": "/html/@lang",
55-
"type": "xpath",
56-
"global": true
57-
}
58-
},
59-
"custom_settings": {
60-
"attributesForFaceting": ["lang"]
61-
}
62-
}
63-
EOF
34+
- name: Create algolia scraper config
35+
run: |
36+
cat << EOF > algolia.json
37+
{
38+
"index_name": "zigbee2mqtt.io",
39+
"sitemap_urls": ["https://www.zigbee2mqtt.io/sitemap.xml"],
40+
"stop_urls": [],
41+
"selectors": {
42+
"lvl0": {
43+
"selector": "header .router-link-active",
44+
"global": true,
45+
"default_value": "Miscellaneous"
46+
},
47+
"lvl1": ".content-page h1, .device-page h1",
48+
"lvl2": ".content-page h2, .device-page h1 + table tbody tr:nth-child(3) td:nth-child(2)",
49+
"lvl3": ".content-page h3",
50+
"lvl4": ".content-page h4",
51+
"lvl5": ".content-page h5",
52+
"text": ".content-page p, .content-page li, .content-page code, .content-page td",
53+
"lang": {
54+
"selector": "/html/@lang",
55+
"type": "xpath",
56+
"global": true
57+
}
58+
},
59+
"custom_settings": {
60+
"attributesForFaceting": ["lang"]
61+
}
62+
}
63+
EOF
6464
65-
- run: curl -sSL https://www.zigbee2mqtt.io/build.txt
65+
- run: curl -sSL https://www.zigbee2mqtt.io/build.txt
6666

67-
- name: Update algolia docsearch
68-
uses: psi-4ward/algolia-docsearch-action@master
69-
with:
70-
algolia_application_id: K1BM3QYQ34
71-
algolia_api_key: ${{ secrets.ALGOLIA_INDEX_APIKEY }}
72-
file: 'algolia.json'
67+
- name: Update algolia docsearch
68+
uses: psi-4ward/algolia-docsearch-action@master
69+
with:
70+
algolia_application_id: K1BM3QYQ34
71+
algolia_api_key: ${{ secrets.ALGOLIA_INDEX_APIKEY }}
72+
file: 'algolia.json'

0 commit comments

Comments
 (0)