chore: effect pattern lint infrastructure (#35210)
This commit is contained in:
parent
1b88ff8d53
commit
1401901529
70 changed files with 524 additions and 234 deletions
|
|
@ -0,0 +1,12 @@
|
|||
id: no-drizzle-column-name
|
||||
snapshots:
|
||||
? |
|
||||
const table = sqliteTable("session", {
|
||||
projectID: text("project_id").notNull(),
|
||||
createdAt: integer("time_created").notNull(),
|
||||
})
|
||||
: labels:
|
||||
- source: text("project_id")
|
||||
style: primary
|
||||
start: 52
|
||||
end: 70
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
id: no-effect-die-string
|
||||
snapshots:
|
||||
Effect.die("boom"):
|
||||
labels:
|
||||
- source: Effect.die("boom")
|
||||
style: primary
|
||||
start: 0
|
||||
end: 18
|
||||
- source: '"boom"'
|
||||
style: secondary
|
||||
start: 11
|
||||
end: 17
|
||||
- source: ("boom")
|
||||
style: secondary
|
||||
start: 10
|
||||
end: 18
|
||||
Effect.die(`boom ${value}`):
|
||||
labels:
|
||||
- source: Effect.die(`boom ${value}`)
|
||||
style: primary
|
||||
start: 0
|
||||
end: 27
|
||||
- source: '`boom ${value}`'
|
||||
style: secondary
|
||||
start: 11
|
||||
end: 26
|
||||
- source: (`boom ${value}`)
|
||||
style: secondary
|
||||
start: 10
|
||||
end: 27
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
id: no-import-alias
|
||||
snapshots:
|
||||
import { baz, foo as bar } from "./foo":
|
||||
labels:
|
||||
- source: foo as bar
|
||||
style: primary
|
||||
start: 14
|
||||
end: 24
|
||||
- source: bar
|
||||
style: secondary
|
||||
start: 21
|
||||
end: 24
|
||||
import { foo as bar } from "./foo":
|
||||
labels:
|
||||
- source: foo as bar
|
||||
style: primary
|
||||
start: 9
|
||||
end: 19
|
||||
- source: bar
|
||||
style: secondary
|
||||
start: 16
|
||||
end: 19
|
||||
import { foo as bar, baz } from "./foo":
|
||||
labels:
|
||||
- source: foo as bar
|
||||
style: primary
|
||||
start: 9
|
||||
end: 19
|
||||
- source: bar
|
||||
style: secondary
|
||||
start: 16
|
||||
end: 19
|
||||
import { type Foo as Bar, baz } from "./foo":
|
||||
labels:
|
||||
- source: type Foo as Bar
|
||||
style: primary
|
||||
start: 9
|
||||
end: 24
|
||||
- source: Bar
|
||||
style: secondary
|
||||
start: 21
|
||||
end: 24
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
id: no-json-parse-cast
|
||||
snapshots:
|
||||
const value = JSON.parse(input) as Record<string, unknown>:
|
||||
labels:
|
||||
- source: JSON.parse(input) as Record<string, unknown>
|
||||
style: primary
|
||||
start: 14
|
||||
end: 58
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
id: no-nested-effect-service-yield
|
||||
snapshots:
|
||||
? |
|
||||
Effect.gen(function* () {
|
||||
yield* (yield* Foo.Service).client.run()
|
||||
})
|
||||
: labels:
|
||||
- source: (yield* Foo.Service).client.run()
|
||||
style: primary
|
||||
start: 35
|
||||
end: 68
|
||||
? |
|
||||
Effect.gen(function* () {
|
||||
yield* (yield* Foo.Service).run()
|
||||
})
|
||||
: labels:
|
||||
- source: (yield* Foo.Service).run()
|
||||
style: primary
|
||||
start: 35
|
||||
end: 61
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
id: no-star-import
|
||||
snapshots:
|
||||
import * as Foo from "./foo":
|
||||
labels:
|
||||
- source: '* as Foo'
|
||||
style: primary
|
||||
start: 7
|
||||
end: 15
|
||||
- source: import * as Foo from "./foo"
|
||||
style: secondary
|
||||
start: 0
|
||||
end: 28
|
||||
import type * as Foo from "./foo":
|
||||
labels:
|
||||
- source: '* as Foo'
|
||||
style: primary
|
||||
start: 12
|
||||
end: 20
|
||||
- source: import type * as Foo from "./foo"
|
||||
style: secondary
|
||||
start: 0
|
||||
end: 33
|
||||
Loading…
Add table
Add a link
Reference in a new issue