enable Prettier hook to pre-commit for YAML & TOML (#2142)
* add Prettier hook for consistent formatting YAML, and TOML files
* fix(pre_commit): 🎨 auto format pre-commit hooks
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
e4d0be777d
commit
6f1eb63825
|
|
@ -34,7 +34,6 @@ coverage:
|
|||
github_checks:
|
||||
annotations: false
|
||||
|
||||
|
||||
comment:
|
||||
layout: header, diff
|
||||
require_changes: false
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ jobs:
|
|||
- name: Minimize uv cache
|
||||
run: uv cache prune --ci
|
||||
|
||||
|
||||
testing-guardian:
|
||||
runs-on: ubuntu-latest
|
||||
needs: run-tests
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ on:
|
|||
pull_request:
|
||||
branches: [main, develop]
|
||||
paths:
|
||||
- '.github/workflows/build-package.yml'
|
||||
- '.github/workflows/publish-pre-release.yml'
|
||||
- ".github/workflows/build-package.yml"
|
||||
- ".github/workflows/publish-pre-release.yml"
|
||||
|
||||
permissions: {} # Explicitly remove all permissions by default
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ on:
|
|||
pull_request:
|
||||
branches: [main, develop]
|
||||
paths:
|
||||
- '.github/workflows/build-package.yml'
|
||||
- '.github/workflows/publish-release.yml'
|
||||
- ".github/workflows/build-package.yml"
|
||||
- ".github/workflows/publish-release.yml"
|
||||
|
||||
permissions: {} # Explicitly remove all permissions by default
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ jobs:
|
|||
if: github.event_name == 'release'
|
||||
uses: AButler/upload-release-assets@v3.0
|
||||
with:
|
||||
files: 'dist/*'
|
||||
files: "dist/*"
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: 🚀 Publish to PyPi
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ on:
|
|||
pull_request:
|
||||
branches: [main, develop]
|
||||
paths:
|
||||
- '.github/workflows/build-package.yml'
|
||||
- '.github/workflows/publish-testpypi.yml'
|
||||
- ".github/workflows/build-package.yml"
|
||||
- ".github/workflows/publish-testpypi.yml"
|
||||
|
||||
permissions: {} # Explicitly remove all permissions by default
|
||||
|
||||
|
|
|
|||
|
|
@ -21,27 +21,35 @@ repos:
|
|||
- id: detect-private-key
|
||||
- id: pretty-format-json
|
||||
exclude: demo.ipynb
|
||||
args: ['--autofix', '--no-sort-keys', '--indent=4']
|
||||
args: ["--autofix", "--no-sort-keys", "--indent=4"]
|
||||
- id: end-of-file-fixer
|
||||
- id: mixed-line-ending
|
||||
|
||||
- repo: https://github.com/tox-dev/pyproject-fmt
|
||||
rev: v2.14.2
|
||||
hooks:
|
||||
- id: pyproject-fmt
|
||||
- repo: https://github.com/JoC0de/pre-commit-prettier
|
||||
rev: v3.8.1 # using tag; previously pinned SHA when tags were not persistent
|
||||
hooks:
|
||||
- id: prettier
|
||||
files: \.(ya?ml|toml)$
|
||||
# https://prettier.io/docs/en/options.html#print-width
|
||||
args: ["--print-width=120"]
|
||||
|
||||
- repo: https://github.com/abravalheri/validate-pyproject
|
||||
rev: v0.25
|
||||
hooks:
|
||||
- id: validate-pyproject
|
||||
- repo: https://github.com/tox-dev/pyproject-fmt
|
||||
rev: v2.14.2
|
||||
hooks:
|
||||
- id: pyproject-fmt
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.15.0
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
args: [--fix]
|
||||
- id: ruff-format
|
||||
types_or: [ python, pyi, jupyter ]
|
||||
- repo: https://github.com/abravalheri/validate-pyproject
|
||||
rev: v0.25
|
||||
hooks:
|
||||
- id: validate-pyproject
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.15.0
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
args: [--fix]
|
||||
- id: ruff-format
|
||||
types_or: [python, pyi, jupyter]
|
||||
|
||||
- repo: https://github.com/executablebooks/mdformat
|
||||
rev: 1.0.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue