Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Repo: Rule [options] parameter should be non-nullable if defaultOptions exists #5439

Open
Labels
blocked by external APIBlocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship APIenhancementNew feature or requestpackage: utilsIssues related to the @typescript-eslint/utils packagerepo maintenancethings to do with maintenance of the repo, and not with code/docs
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Suggestion

Right now, if a rule is created throughutil.createRule withdefaultOptions, thecreate function's second parameter is an array whose first element is stillOptions | undefined. That means folks have to!. For example, in#5327:

create(context,[_options]){
constoptions=_options!;

Unless I've grossly misinterpreted the rule options, those! should be unnecessary, right?

Edit:here's a TypeScript playground with an isolated repro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked by external APIBlocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship APIenhancementNew feature or requestpackage: utilsIssues related to the @typescript-eslint/utils packagerepo maintenancethings to do with maintenance of the repo, and not with code/docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp