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

Docs: [prefer-nullish-coalescing] streamline code examples #10566

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
@kirkwaiblinger

Description

@kirkwaiblinger

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

The code examples

  1. don't use our standard tabs approach to displaying incorrect vs correct code
  2. Repeat the same snippet over and over unnecessarily (the intention was probably to show how the fixer works, but it just isn't great how it's done.)
    constfoo:any='bar';foo??'a string';foo??'a string';foo??'a string';foo??'a string';constfoo:string|undefined='bar';foo??'a string';foo??'a string';constfoo:string|null='bar';foo??'a string';foo??'a string';

Let's use the tabs and streamline the examples a bit. Also let's remove the duplicate identifiers so that the code is valid TS as written.

Affected URL(s)

https://typescript-eslint.io/rules/prefer-nullish-coalescing/

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

    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