forked from boxwise/boxtribute
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
58 lines (58 loc) · 1.67 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: statviz/src/types/generated
- repo: local
hooks:
- id: black
name: Format Python files
entry: black
types: [python]
language: system
require_serial: true
- id: flake8
name: Lint Python files
entry: flake8
types: [python]
language: system
require_serial: true
- id: mypy
name: Run Python type checks
entry: mypy
types_or: [python, pyi]
exclude: back/test
language: system
args: ["--scripts-are-modules"]
require_serial: true
- id: isort
name: Sort Python imports
entry: isort
types_or: [cython, pyi, python]
language: system
require_serial: true
args: ["--filter-files"]
- id: eslint
name: Lint Typescript files
entry: ./invoke_yarn lint
files: ^react/.*
types_or: [javascript, jsx, ts, tsx]
language: script
require_serial: true
- id: prettier
name: Format Typescript files
entry: ./invoke_yarn format
files: ^react/.*
types_or: [javascript, jsx, ts, tsx]
language: script
require_serial: true
- id: generate-graphql-ts-types
name: Generate GraphQL Typescript definitions
entry: ./invoke_yarn graphql-types
types: [graphql]
language: script
require_serial: true