10000 Enhancement: Remove allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing · Issue #9891 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content
Enhancement: Remove allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing #9891
Open
@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

      0