Skip to content

[no-unsafe-optional-property-assignment] too noisy #83

@danielnixon

Description

@danielnixon

The new no-unsafe-optional-property-assignment rule works, and it flags unsafe assignment as described in the original ticket #39 but it's probably too noisy in practice to add to the recommended rule set.

Before we add it to the recommended rule set, we should see if we can relax it in any (safe) ways. Some ideas to pursue:

  1. scope analysis
  2. don't flag an assignment as unsafe when the RHS is an object literal. We will need to tread carefully here to avoid false negatives. If the object literal contains an object spread operator ... then we still have to flag it. If the object literal contains references to other values, we still have to flag it. It's only if the object literal is itself made up of other literals exclusively that this would be safe

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    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