fix(core): clean up Effect audit patterns (#35174)

This commit is contained in:
Kit Langton 2026-07-03 13:54:13 -04:00 committed by GitHub
commit 1b88ff8d53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 118 additions and 62 deletions

View file

@ -0,0 +1,6 @@
id: no-json-parse-cast
language: TypeScript
message: Prefer Effect Schema JSON decoding over JSON.parse casts.
severity: error
rule:
pattern: JSON.parse($INPUT) as $TYPE

View file

@ -0,0 +1,11 @@
id: no-nested-effect-service-yield
language: TypeScript
message: Bind Effect services before calling methods instead of nesting service yields.
severity: error
rule:
any:
- pattern: (yield* $SERVICE).$METHOD($$$ARGS)
- pattern: (yield* $SERVICE).$PROPERTY.$METHOD($$$ARGS)
constraints:
SERVICE:
regex: \.Service$