Skip to content

oxlint-config: v5 で無効だった jsdoc の5規則が v6 で warn に戻っている #1062

Open

Description

@YusukeHirao

As is

@d-zero/oxlint-configは、次の5つの jsdoc 規則をwarnにしている。

  • jsdoc/require-param-type
  • jsdoc/require-param-description
  • jsdoc/require-returns
  • jsdoc/require-returns-type
  • jsdoc/require-returns-description

v5 の@d-zero/eslint-configは、この5つを無効にしていた。

  • 00be9bb(2024-12-09、feat(eslint): support for flat config)でjsdoc.configs['flat/recommended']を入れたとき、この5つを0にしている
  • @d-zero/oxlint-configの追加はa57fd53(2026-08-19)で、無効にしたのはそれより前

5522bd1(feat(oxlint): enable rules outside the correctness category)は、5つをwarnにした理由を次のように書いている。

base.js was disabling them for ESLint on the assumption Oxlint covered them, so neither linter was actually checking for them.

この5つは、oxlint の担当と見なして無効にしていたのではなく、oxlint より前から意図して無効にしていたので、この理由は当てはまらない。126503bの前のbase.jsでは、この5つが oxlint と重なる規則の一覧に混ざっていたので、取り違えたのだと思う。

TypeScript のファイルでも出る。d-zero-dev/frontend-envのルートでoxlint .を実行すると、警告はrequire-param-typeが248件、require-param-descriptionが239件、require-returnsが136件だった。この3つの計623件のうち、586件が.ts、37件が.jsだった。TypeScript では型をシグネチャに書くので、require-param-typeとrequire-returns-typeは求める意味がない。

To be

5つを v5 と同じく無効にする。少なくとも、TypeScript のファイル(**/*.{ts,mts,cts,tsx})ではrequire-param-typeとrequire-returns-typeを無効にする。

Why

v5 の決定が意図せず変わり、利用側に数百件の警告が出る。警告が多いと、見るべき警告が埋もれる。

How

packages/@d-zero/oxlint-config/index.jsから5つの規則を外す(またはoverridesで TypeScript のファイルだけ無効にする)。

確認した版: @d-zero/oxlint-config@6.0.0-alpha.3

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions