-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
58 lines (52 loc) · 1.48 KB
/
.pre-commit-config.yaml
File metadata and controls
58 lines (52 loc) · 1.48 KB
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
repos:
# pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
# prettier formatters
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
files: '^nextjs/.*\.(js|jsx|ts|tsx|json|yaml|md|css|html)$'
args: [--write]
# typescript linter
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.46.0
hooks:
- id: eslint
args: [--fix]
# typescript type checker
- repo: local
hooks:
- id: tsc
name: typescript type checker
entry: npx --prefix nextjs tsc --noEmit --project nextjs/tsconfig.json
language: system
files: '^nextjs/.*\.(ts|tsx)$'
pass_filenames: false
# python linter and formatter
- repo: https://github.com/psf/black
rev: 26.1.0
hooks:
- id: black
# python dependency sorter
- repo: https://github.com/pycqa/isort
rev: 8.0.0
hooks:
- id: isort
name: isort (python)
args: [--profile, black]
# python import and variable checker
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.2
hooks:
- id: autoflake
args: [--remove-all-unused-imports, --remove-unused-variables, --in-place]