Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ repos:
name: "Shell checking"
args:
- --external-sources
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.6.2
hooks:
- id: prettier
additional_dependencies:
- prettier@3.6.2
- prettier-plugin-sort-json@4.1.1
name: "Prettier (JSON sorting)"
- repo: https://github.com/biomejs/pre-commit
rev: v2.3.11
hooks:
Expand Down
6 changes: 5 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
custom_components/plugwise/manifest.json
*.md
*.yaml
tests
.github
.prettierrc.js
24 changes: 24 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/** @type {import("prettier").Config} */
module.exports = {
overrides: [
{
files: "./custom_components/**/*.json",
options: {
plugins: [require.resolve("prettier-plugin-sort-json")],
jsonRecursiveSort: true,
jsonSortOrder: JSON.stringify({ [/.*/]: "numeric" }),
},
},
{
files: ["manifest.json", "./**/brands/*.json"],
options: {
// domain and name should stay at the top
jsonSortOrder: JSON.stringify({
domain: null,
name: null,
[/.*/]: "numeric",
}),
},
},
],
};
12 changes: 6 additions & 6 deletions custom_components/plugwise/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@
"dhw_mode": {
"default": "mdi:shower",
"state": {
"auto": "mdi:auto-mode",
"boost": "mdi:rocket-launch",
"comfort": "mdi:sofa",
"eco": "mdi:leaf",
"off": "mdi:circle-off-outline",
"boost": "mdi:rocket-launch",
"auto": "mdi:auto-mode"
"off": "mdi:circle-off-outline"
}
},
"gateway_mode": {
Expand All @@ -84,11 +84,11 @@
"regulation_mode": {
"default": "mdi:hvac",
"state": {
"bleeding_hot": "mdi:fire-circle",
"bleeding_cold": "mdi:water-circle",
"off": "mdi:circle-off-outline",
"bleeding_hot": "mdi:fire-circle",
"cooling": "mdi:snowflake",
"heating": "mdi:radiator",
"cooling": "mdi:snowflake"
"off": "mdi:circle-off-outline"
}
},
"select_schedule": {
Expand Down
Loading
Loading