chore: effect pattern lint infrastructure (#35210)
This commit is contained in:
parent
1b88ff8d53
commit
1401901529
70 changed files with 524 additions and 234 deletions
22
script/ast-grep/rules/no-effect-die-string.yml
Normal file
22
script/ast-grep/rules/no-effect-die-string.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
id: no-effect-die-string
|
||||
language: TypeScript
|
||||
message: die with `new Error(...)`.
|
||||
severity: error
|
||||
rule:
|
||||
any:
|
||||
- all:
|
||||
- pattern: Effect.die($MESSAGE)
|
||||
- has:
|
||||
field: arguments
|
||||
all:
|
||||
- kind: arguments
|
||||
- has:
|
||||
kind: string
|
||||
- all:
|
||||
- pattern: Effect.die($MESSAGE)
|
||||
- has:
|
||||
field: arguments
|
||||
all:
|
||||
- kind: arguments
|
||||
- has:
|
||||
kind: template_string
|
||||
Loading…
Add table
Add a link
Reference in a new issue