Skip to content

Unused eslint-disable directive in maximal-core start/cli.ts after citty 0.2 bump #27

Open

Description

@stuffbucket

What happens

turbo run lint reports:

packages/maximal-core/src/lib/start/cli.ts
  101:9  warning  Unused eslint-disable directive
         (no problems were reported from '@typescript-eslint/no-unnecessary-condition')

Cause

The directive guards a rateLimitRaw === undefined check:

const rateLimitRaw = args["rate-limit"]
const rateLimit =
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
  rateLimitRaw === undefined ? undefined : Number.parseInt(rateLimitRaw, 10)

citty moved ^0.1.6 -> ^0.2.2 in bf5a987 (#19), which changed the parsed-arg types so the condition is no longer flagged as unnecessary. The suppression outlived what it suppressed. Dependabot would not have re-linted.

Present on main today; also surfaces on the branch in #25, which carries the same expression unchanged.

Fix

Drop the comment. --fix handles it:

pnpm --filter @stuffbucket/maximal-core exec eslint --fix src/lib/start/cli.ts

Warning only — lint exits 0, so this is cleanup, not a break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions