Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 1.68 KB

missing-concurrency-option.md

File metadata and controls

66 lines (53 loc) · 1.68 KB

missingConcurrencyOption

Reports Effect.all and Effect.forEach calls without an explicit concurrency option, which run sequentially by default

Property Value
Category Style
Default severity off
Fixable Yes
Effect versions v3, v4
Diagnostic codes TS377188
Language Service name missingConcurrencyOption
Oxlint name effecttsgo/missing-concurrency-option

Preview

import { Effect } from "effect"

declare const items: ReadonlyArray<number>
declare const save: (n: number) => Effect.Effect<void>

export const program = Effect.forEach(items, save)
/**
                       ^^^^^^^^^^^^^^ effecttsgo(missing-concurrency-option): `Effect.forEach` runs sequentially unless `concurrency` is set; pass `{ concurrency: 1 }` to keep sequential execution or set the concurrency you intend.
*/

Language Service Configuration

See the Language Service setup guide for installation instructions.

{
  "$schema": "./node_modules/@effect/tsgo/schema.json",
  "compilerOptions": {
    "plugins": [
      {
        "name": "@effect/language-service",
        "diagnosticSeverity": {
          "missingConcurrencyOption": "warning"
        }
      }
    ]
  }
}

Oxlint Configuration

See the Oxlint setup guide for installation and patching instructions.

{
  "$schema": "./node_modules/@effect/tsgo/oxlint-schema.json",
  "options": {
    "typeAware": true
  },
  "plugins": ["effecttsgo"],
  "rules": {
    "effecttsgo/missing-concurrency-option": "warn"
  }
}