-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
77 lines (77 loc) · 3.1 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
repos:
- repo: local
hooks:
# Root
- id: root-lint
name: "lint root"
entry: /usr/bin/env bash -c "npm run format"
exclude: (^solidity/|^dapp/|^subgraph/)
language: script
description: "Checks code according to the package's linter configuration"
# Solidity
- id: solidity-lint-sol
name: "lint solidity sol"
entry: /usr/bin/env bash -c "npm --prefix ./solidity/ run lint:sol"
files: ^solidity/
types: [solidity]
language: script
description: "Checks solidity code according to the package's linter configuration"
- id: solidity-lint-js
name: "lint solidity ts/js"
entry: /usr/bin/env bash -c "npm --prefix ./solidity/ run lint:js"
files: ^solidity/
types_or: [ts, javascript]
language: script
description: "Checks TS/JS code according to the package's linter configuration"
- id: solidity-lint-config
name: "lint solidity json/yaml"
entry: /usr/bin/env bash -c "npm --prefix ./solidity/ run lint:config"
files: ^solidity/
types_or: [json, yaml]
language: script
description: "Checks JSON/YAML code according to the package's linter configuration"
# dApp
- id: dapp-lint-js
name: "lint dapp ts/js"
entry: /usr/bin/env bash -c "npm --prefix ./dapp/ run lint:js"
files: ^dapp/
types_or: [ts, tsx, javascript, jsx]
language: script
description: "Checks TS/JS code according to the package's linter configuration"
- id: dapp-lint-config
name: "lint dapp json/yaml"
entry: /usr/bin/env bash -c "npm --prefix ./dapp/ run lint:config"
files: ^dapp/
types_or: [json, yaml]
language: script
description: "Checks JSON/YAML code according to the package's linter configuration"
# SDK
- id: sdk-lint-js
name: "lint sdk ts/js"
entry: /usr/bin/env bash -c "npm --prefix ./sdk/ run lint:js"
files: ^sdk/
types_or: [ts, javascript]
language: script
description: "Checks TS/JS code according to the package's linter configuration"
- id: sdk-lint-config
name: "lint sdk json/yaml"
entry: /usr/bin/env bash -c "npm --prefix ./sdk/ run lint:config"
files: ^sdk/
types_or: [json, yaml]
language: script
description: "Checks JSON/YAML code according to the package's linter configuration"
# Subgraph
- id: subgraph-lint-js
name: "lint subgraph ts/js"
entry: /usr/bin/env bash -c "npm --prefix ./subgraph/ run lint:js"
files: ^subgraph/
types_or: [ts, javascript]
language: script
description: "Checks TS/JS code according to the package's linter configuration"
- id: subgraph-lint-config
name: "lint subgraph json/yaml"
entry: /usr/bin/env bash -c "npm --prefix ./subgraph/ run lint:config"
files: ^subgraph/
types_or: [json, yaml]
language: script
description: "Checks JSON/YAML code according to the package's linter configuration"