Skip to content

Commit

Permalink
Gdwr/pre commit (#123)
Browse files Browse the repository at this point in the history
Fix pre-commit for new monorepo structure
  • Loading branch information
GDWR authored Jun 18, 2024
1 parent dfa9532 commit a06efb9
Show file tree
Hide file tree
Showing 7 changed files with 322 additions and 325 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Run pre-commit hooks
working-directory: src/api
run: SKIP=ruff-lint pre-commit run --files src/api
run: SKIP=ruff pre-commit run --files src/api

# Run `ruff` using github formatting to enable automatic inline annotations.
- name: Run ruff
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
.vscode

__pycache__/

49 changes: 49 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
name: Global | Check Yaml
- id: check-toml
name: Global | Check Toml
- id: end-of-file-fixer
name: Global | End of File Fixer
- id: trailing-whitespace
name: Global | Trailing Whitespace
- id: check-added-large-files
name: Global | Check Added Large Files

- repo: local
hooks:
- id: poetry
name: Api | Installing Project Dependencies via Poetry
entry: poetry -C src/api install --no-root
language: system
require_serial: true
pass_filenames: false

- id: ruff
name: Api | Run Ruff via Poetry
entry: poetry -C src/api run ruff check --fix --exit-non-zero-on-fix
language: system
require_serial: true
pass_filenames: false

- id: prisma format
name: Api | Run Prisma Format via Poetry
entry: poetry -C src/api run prisma format --schema=src/api/prisma/schema.prisma
language: system
require_serial: true

- id: prisma generate
name: Api | Run Prisma Generate via Poetry
entry: poetry -C src/api run prisma generate --schema=src/api/prisma/schema.prisma
language: system
require_serial: true

- id: pyright
name: Api | Run Pyright via Poetry
entry: poetry -C src/api run pyright
language: system
types: [python]
require_serial: true
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Authentic Auth Service... Provides identification of a user from multiple external services.

Currently supported;
- Discord

Currently supported:
- Discord
- GitHub

# Using AbandonAuth

Expand Down
46 changes: 0 additions & 46 deletions src/api/.pre-commit-config.yaml

This file was deleted.

Loading

0 comments on commit a06efb9

Please sign in to comment.