Add validation

This commit is contained in:
Edward Firmo
2024-06-19 09:16:27 +02:00
parent d4cfaaee87
commit 6731da7bc5
15 changed files with 504 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
{
"MD013": { "line_length": 200 }
}

2
.rules/markdownlint.yml Normal file
View File

@@ -0,0 +1,2 @@
MD013:
line_length: 200

13
.rules/mlc_config.json Normal file
View File

@@ -0,0 +1,13 @@
{
"ignorePatterns": [
{
"pattern": "^http://homeassistant\\.local.*$"
},
{
"pattern": "^https://sonoff.tech/product/central-control-panel/nspanel/$"
},
{
"pattern": "^https://sonoff.tech/wp-content/uploads/2021/11/%E4%BA%A7%E5%93%81%E5%8F%82%E6%95%B0%E8%A1%A8-NSPanel-20210831.pdf$"
}
]
}

42
.rules/yamllint.yml Normal file
View File

@@ -0,0 +1,42 @@
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
---
yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'
rules:
anchors:
forbid-undeclared-aliases: true
forbid-duplicated-anchors: true
braces: enable
brackets: enable
colons: enable
commas: enable
comments:
level: warning
comments-indentation:
level: warning
document-end:
level: warning
document-start:
level: warning
empty-lines: enable
empty-values: disable
float-values:
level: warning
hyphens: enable
indentation: enable
key-duplicates: enable
key-ordering: disable
line-length:
max: 200
new-line-at-end-of-file: enable
new-lines: enable
octal-values:
level: warning
quoted-strings: disable
trailing-spaces: enable
truthy:
level: warning
...