forked from cursorless-dev/cursorless
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
91 lines (91 loc) · 2.89 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
81
82
83
84
85
86
87
88
89
90
91
minimum_pre_commit_version: "2.9.0"
ci:
autoupdate_schedule: monthly
exclude: /vendor/|^data/playground/
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: local
hooks:
- id: forbid-symlinks
name: Forbid symlinks
entry: Forbid symlinks
language: fail
types: [symlink]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
hooks:
- id: forbid-crlf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
exclude_types: [svg]
exclude: ^patches/.*\.patch$|\.scope$
- id: fix-byte-order-marker
- id: forbid-submodules
- id: mixed-line-ending
- id: trailing-whitespace
# Trailing whitespace breaks yaml files if you use a multiline string
# with a line that has trailing white space. Many of our recorded
# tests use strings with trailing white space to represent the final
# document contents. For example
# data/fixtures/recorded/languages/ruby/changeCondition.yml
exclude: ^data/fixtures/recorded/.*/[^/]*\.yml$|\.scope$|/generated/|^patches/
- repo: local
hooks:
- id: eslint
name: eslint
files: \.(ts|tsx)$
language: system
entry: pnpm exec eslint
args: [--fix]
- repo: local
hooks:
- id: prettier
name: prettier
types: [text]
language: system
entry: pnpm exec prettier
args: [--write, --list-different, --ignore-unknown]
- repo: local
hooks:
- id: format-recorded-tests
name: format-recorded-tests
files: ^data/fixtures/recorded/.*/[^/]*\.yml$
language: system
entry: pnpm exec ./packages/common/scripts/my-ts-node.js packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts
- repo: local
hooks:
- id: check-recorded-test-marks
name: check-recorded-test-marks
files: ^data/fixtures/recorded/.*/[^/]*\.yml$
language: system
entry: pnpm exec ./packages/common/scripts/my-ts-node.js packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts --check-marks
- repo: https://github.com/ikamensh/flynt
rev: "1.0.1"
hooks:
- id: flynt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/lunarmodules/luacheck
rev: v1.2.0
hooks:
- id: luacheck
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v0.20.0
hooks:
- id: stylua