Explorar el Código

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

Fredrik hace 11 meses
padre
commit
6b8a672c70
Se han modificado 2 ficheros con 8 adiciones y 1 borrados
  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