Skip to content

Commit ebe2b80

Browse files
committed
Add .pre-commit-config.yaml and .prettierignore
1 parent 55f33e4 commit ebe2b80

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

.pre-commit-config.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# pre-commit is a tool to perform a predefined set of tasks manually and/or
2+
# automatically before git commits are made.
3+
#
4+
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
5+
#
6+
# Common tasks
7+
#
8+
# - Run on all files: pre-commit run --all-files
9+
# - Register git hooks: pre-commit install --install-hooks
10+
#
11+
repos:
12+
# FIXME: Autoformatting of our .py files by pyupgrade/autoflake/isort/black is
13+
# initially not enabled as it would lead to large indentation changes
14+
# while we currently have several open PRs good to resolve first.
15+
#
16+
17+
# # Autoformat: Python code, syntax patterns are modernized
18+
# - repo: https://github.com/asottile/pyupgrade
19+
# rev: v3.3.1
20+
# hooks:
21+
# - id: pyupgrade
22+
# args:
23+
# - --py37-plus
24+
25+
# # Autoformat: Python code
26+
# - repo: https://github.com/PyCQA/autoflake
27+
# rev: v2.0.0
28+
# hooks:
29+
# - id: autoflake
30+
# # args ref: https://github.com/PyCQA/autoflake#advanced-usage
31+
# args:
32+
# - --in-place
33+
34+
# # Autoformat: Python code
35+
# - repo: https://github.com/pycqa/isort
36+
# rev: 5.11.4
37+
# hooks:
38+
# - id: isort
39+
40+
# # Autoformat: Python code
41+
# - repo: https://github.com/psf/black
42+
# rev: 22.12.0
43+
# hooks:
44+
# - id: black
45+
46+
# Autoformat: markdown, yaml, javascript (see the file .prettierignore)
47+
- repo: https://github.com/pre-commit/mirrors-prettier
48+
rev: v3.0.0-alpha.4
49+
hooks:
50+
- id: prettier
51+
# FIXME: Autoformatting of our .js files is initially not enabled as it
52+
# would lead to large indentation changes while we currently have
53+
# several open PRs good to resolve first.
54+
exclude_types:
55+
- "javascript"
56+
57+
# Autoformat and linting, misc. details
58+
- repo: https://github.com/pre-commit/pre-commit-hooks
59+
rev: v4.4.0
60+
hooks:
61+
- id: end-of-file-fixer
62+
- id: requirements-txt-fixer
63+
- id: check-case-conflict
64+
- id: check-executables-have-shebangs
65+
66+
# Linting: Python code (see the file .flake8)
67+
- repo: https://github.com/PyCQA/flake8
68+
rev: "6.0.0"
69+
hooks:
70+
- id: flake8
71+
72+
ci:
73+
# pre-commit.ci will open PRs updating our hooks once a month
74+
autoupdate_schedule: monthly

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nbgitpuller/templates/

0 commit comments

Comments
 (0)