-
Notifications
You must be signed in to change notification settings - Fork 451
/
.pre-commit-config.yaml
81 lines (81 loc) · 3.36 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
repos:
- repo: local
hooks:
- id: check-instanceof-model
name: Check that we do not use instanceof or ensureInstance or ensureInstanceMaybe with model types
files: ^platform/wab/src/.*\.(ts|tsx)$
entry: platform/wab/node_modules/.bin/ts-node -P platform/wab/tsconfig.tools.json -r tsconfig-paths/register platform/wab/tools/check-instanceof-model.ts
language: system
- repo: local
hooks:
- id: check-weakrefs
name: Check new weak refs in the project and warn about files that might need to be updated
files: ^platform/wab/src/wab/model/model-schema.ts$
entry: platform/wab/node_modules/.bin/ts-node -P platform/wab/tsconfig.tools.json -r tsconfig-paths/register platform/wab/tools/checkWeakRefs.ts
language: system
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
name: Check merge conflicts
- id: trailing-whitespace
name: Check trailing whitespaces
exclude: ^.*/__snapshots__/.*$
- repo: local
hooks:
- id: eslint
name: Run eslint on ts/tsx files
files: ^platform/wab/src/.*\.(ts|tsx)$
types: [file]
entry: env NODE_OPTIONS=--max-old-space-size=4096 yarn eslint --cache --fix
language: system
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
name: Run prettier on code written by humans
files: ^.*\.(js|jsx|cjs|mjs|ts|tsx|cts|mts|json|css|scss|md|toml|xml)$
entry: env NODE_OPTIONS=--max-old-space-size=4096 prettier --write --ignore-unknown
additional_dependencies:
- id: prettier
name: Run prettier, without import sorting, on Plasmic-generated files
files: ^.*/plasmic/.*\.(js|jsx|ts|tsx|json|css|scss|md|toml|xml)$
additional_dependencies:
# From public-packages
# - repo: https://github.com/pre-commit/mirrors-eslint
# rev: v8.44.0
# hooks:
# - id: eslint
# types: [file]
# files: ^.*\.(ts|tsx)$
# exclude: ^.*/plasmic/.*$
# additional_dependencies:
# - "@typescript-eslint/[email protected]"
# - "@typescript-eslint/[email protected]"
# - "[email protected]"
# - "[email protected]"
# - "[email protected]"
# - "[email protected]"
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint
name: Lint Dockerfiles
args: [--failure-threshold=warning]
- repo: local
hooks:
- id: check-plume-version
name: Check plume-master-pkg.json matches REAL_PLUME_VERSION
files: ^platform/wab/src/wab/(server/pkg-mgr/(data/.*\.json|index\.ts|plume-pkg-mgr\.ts)|shared/pkg-versions\.ts)$
entry: platform/wab/node_modules/.bin/tsx --tsconfig platform/wab/tsconfig.tools.json platform/wab/src/wab/server/pkg-mgr/plume-pkg-mgr.ts check
language: system
- repo: local
hooks:
- id: check-bundle-migrations
name: Update list of bundle migrations and check migration numbers
files: ^platform/wab/src/wab/server/bundle-migrations/.*$
entry: platform/wab/tools/bundle-migration-check.sh
language: system