فهرست منبع

Added fix to ruff and prettier to auto format. Rename added .yaml to yamllint to prevent auto format

Fredrik 11 ماه پیش
والد
کامیت
6b8a672c70
2فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 6 1
      .pre-commit-config.yaml
  2. 2 0
      .yamllint.yaml

+ 6 - 1
.pre-commit-config.yaml

@@ -5,18 +5,23 @@ repos:
       - id: ruff-check
         args:
           - --output-format=github
+          - --fix
       - id: ruff-check
         name: ruff include order
         args:
           - --select
           - I
-          - --diff
+          - --fix
       - id: ruff-format
         name: ruff coding style
         args:
           - --check
           - --diff
         files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.(py|pyi)$
+  - repo: https://github.com/pre-commit/mirrors-prettier
+    rev: v3.0.3
+    hooks:
+      - id: prettier
   - repo: https://github.com/adrienverge/yamllint.git
     rev: v1.37.1
     hooks:

+ 2 - 0
.yamllint → .yamllint.yaml

@@ -4,3 +4,5 @@ extends: default
 rules:
   document-start: disable
   new-lines: disable
+  comments:
+    min-spaces-from-content: 1