diff options
| -rw-r--r-- | .github/workflows/prek.yml | 22 | ||||
| -rw-r--r-- | .pre-commit-config.yaml | 16 | ||||
| -rw-r--r-- | pyproject.toml | 4 |
3 files changed, 35 insertions, 7 deletions
diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml new file mode 100644 index 0000000..094ebf9 --- /dev/null +++ b/.github/workflows/prek.yml @@ -0,0 +1,22 @@ +name: Prek Checks + +on: + push: + branches: ["main", "dev"] + pull_request: + branches: ["main", "dev"] + workflow_dispatch: + +permissions: + contents: read + +jobs: + prek: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run prek + uses: j178/prek-action@v1 + with: + all_files: ${{ github.event_name == 'pull_request' }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 01d4add..0a9b345 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,22 @@ +minimum_prek_version: '0.2.28' + repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + - repo: builtin hooks: - - id: check-ast - - id: check-case-conflict - id: check-json exclude: ^ui/tsconfig.*\.json$ - id: check-toml - id: check-yaml + - id: check-case-conflict - id: fix-byte-order-marker + - id: end-of-file-fixer + - id: check-merge-conflict + - id: detect-private-key + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-ast - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.6 diff --git a/pyproject.toml b/pyproject.toml index 10e6bbf..d49374f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,9 +4,7 @@ dynamic = ["version"] description = "DropOut is a modern, minimalist, and efficient Minecraft launcher built with the latest web and system technologies. It leverages Tauri v2 to deliver a lightweight application with a robust Rust backend and a reactive Svelte 5 frontend." readme = "README.md" requires-python = ">=3.10" -dependencies = [ - "pre-commit>=4.5.1", -] +dependencies = [] [build-system] requires = ["hatchling"] |