Kaynağa Gözat

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

Fredrik 7 ay önce
ebeveyn
işleme
6b8a672c70
2 değiştirilmiş dosya ile 8 ekleme ve 1 silme
  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