Add prettier to pre-commit (#3268)

This commit is contained in:
Dimitri Papadopoulos Orfanos
2024-01-02 16:25:48 +01:00
committed by GitHub
parent 5facd6ff37
commit 3a3058ad35
6 changed files with 66 additions and 62 deletions

View File

@ -20,16 +20,16 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
no-toml:
- ''
- ""
include:
- python-version: '3.10'
no-toml: 'no-toml'
- python-version: "3.10"
no-toml: "no-toml"
name: ${{ matrix.python-version }} ${{ matrix.no-toml }}
steps:
- uses: actions/checkout@v4
@ -58,7 +58,6 @@ jobs:
# this file has an error
- run: "! codespell codespell_lib/tests/test_basic.py"
make-check-dictionaries:
runs-on: ubuntu-latest
timeout-minutes: 10

View File

@ -15,7 +15,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.8"
- name: Install dependencies
run: |
python --version

View File

@ -24,7 +24,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip

View File

@ -11,7 +11,7 @@ repos:
entry: mdformat # Executable to run, with fixed options
language: python
types: [markdown]
args: [--wrap, '75', --number]
args: [--wrap, "75", --number]
additional_dependencies:
- mdformat-toc
- mdformat-beautysh
@ -56,12 +56,17 @@ repos:
args:
- --no-warnings
- -d
- '{extends: relaxed, rules: {line-length: {max: 90}}}'
- "{extends: relaxed, rules: {line-length: {max: 90}}}"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks: