robosats/.pre-commit-config.yaml
Reckless_Satoshi d88c2a5eff
Add App context (#369)
* Refactor fetchRobot

* Add appcontext

* Robot recovery fixes

* Add usecontext on maker and settings forms

* Add usecontext to booktable

* Add useContext to order page and main dialogs

* Small fixes
2023-02-24 19:17:13 +00:00

75 lines
2.1 KiB
YAML

# TODO
# add a hook which automatically generates the OpenApi schema on API changes
# and places them in an appropriate location
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v2.3.0
hooks:
- id: check-merge-conflict
- id: check-yaml
- id: check-toml
- id: mixed-line-ending
args:
- '--fix=lf'
- id: trailing-whitespace
- id: pretty-format-json
args:
- '--autofix'
- '--no-sort-keys'
- '--no-ensure-ascii'
- id: check-builtin-literals
- id: check-docstring-first
- repo: local
hooks:
# - id: collect-phrases
# name: Collect i18n phrases
# stages:
# - commit
# - merge-commit
# language: system
# files: ^frontend/
# types_or: [javascript, jsx, ts, tsx] # uses https://github.com/pre-commit/identify
# entry: bash -c 'cd frontend/static/locales && python3 collect_phrases.py'
- id: prettier-frontend
name: prettier-frontend
stages:
- commit
- merge-commit
language: system
files: ^frontend/
types_or: [javascript, jsx, ts, tsx, css, markdown, json] # uses https://github.com/pre-commit/identify
entry: bash -c 'cd frontend && npm run format'
- id: prettier-mobile
name: prettier-mobile
stages:
- commit
- merge-commit
language: system
files: ^mobile/
types_or: [javascript, jsx, ts, tsx, css, markdown, json] # uses https://github.com/pre-commit/identify
entry: bash -c 'cd mobile && npm run format'
- id: isort
name: isort
stages:
- commit
- merge-commit
language: system
types: [python]
entry: isort
- id: black
name: black
stages:
- commit
- merge-commit
language: system
types: [python]
entry: black
- id: flake8
name: flake8
stages:
- commit
- merge-commit
language: system
types: [python]
entry: flake8