forked from ZJUEarthData/Geochemistrypi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
81 lines (74 loc) · 2.87 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
name: Python Code Formatter
description: Apply the Black code formatter
files: \.(py|pyx)$
args: [--line-length=200]
exclude: ^node_modules/
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: Import formatter
description: Sorts Python imports
files: \.(py|pyx)$
args: [--line-length=200, --profile=black]
exclude: ^node_modules/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
name: Trailing Whitespace Checker
description: Checks for and removes trailing whitespace from files.
files: \.(py|md|txt)$
exclude: ^node_modules/
- id: end-of-file-fixer
name: End-of-file Fixer
description: Ensures that files end with a newline.
files: \.(py|md|txt)$
exclude: ^node_modules/
- id: check-yaml
name: YAML Checker
description: Checks for syntax errors in YAML files.
files: \.(yml|yaml)$
exclude: ^node_modules/
- id: check-added-large-files
name: Large Files Checker
description: Checks for large files added to git.
types: [file]
exclude: ^node_modules/
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
name: Flake8 Linter
description: Check Python code for style and possible errors
files: \.(py|pyx)$
# args: [--max-line-length=200, --max-complexity=100, --ignore=F811,W605]
# Use config file to pass multiple values to the argument
args: [--config=.flake8]
exclude: ^node_modules/
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
name: Frontend Code Formatter
description: Apply the Prettier code formatter
files: \.(js|jsx|css|ts|tsx)$
args: [--write, --semi=true, --single-quote=true, --trailing-comma=all, --print-width=200, --tab-width=4, --jsx-single-quote=false]
exclude: ^node_modules/
# Problem: some dependencies cannot be installed with pre-commit
# - repo: https://github.com/pre-commit/mirrors-eslint
# rev: v7.32.0
# hooks:
# - id: eslint
# name: ESlint Linter
# description: Check Frontend code for style and possible errors
# files: \.(js|jsx|ts|tsx)$
# additional_dependencies: [eslint-config-prettier@8.8.0, eslint@4.15.0, eslint-plugin-react, eslint-plugin-react-hooks, '@typescript-eslint/parser', '@typescript-eslint/eslint-plugin', eslint-plugin-jsx-a11y, eslint-plugin-import, eslint-plugin-prettier]
# exclude: ^node_modules/