Skip to content

Enhancement: Remove allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing #9891

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Overview

An option named allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing exists in three rules:

Each comes with a very stern explanation of why not to use it:

Without strictNullChecks, TypeScript essentially erases undefined and null from the types. This means when this rule inspects the types from a variable, it will not be able to tell that the variable might be null or undefined, which essentially makes this rule a lot less useful.

It's bugged me for a while that we've kept these options around. They add bloat to the docs and rule logic. And practically nobody uses them.

A Sourcegraph search for allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing shows only 3 public repos visibly using setting it to true - and 5 setting it to false.

Proposal: let's...

  1. Deprecate the options as a non-breaking change now
  2. Remove them in the next major version with functional changes

💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedenhancementNew feature or requestpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy