Skip to content

Make sure type-aware lint rules' test cases are type-error-free #8298

@Josh-Cena

Description

@Josh-Cena

Suggestion

We should add an extra type-checking step to rule-tester when testing type-aware lint rules. Right now, we have some test cases that don't pass, most notably because they have undeclared variables (which become any). However we don't guarantee linting behavior when there are type errors (because the result is likely any, which either created new lint errors or masks actual lint errors). Such type errors may be hard to catch in more complex situations.

Brad mentioned there may be a perf penalty, but it would be useful to experiment nonetheless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueenhancementNew feature or requestpackage: rule-testerIssues related to the @typescript-eslint/rule-tester package

    Type

    No type

    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