Skip to content

Rule suggestion: generalize @typescript-eslint/no-angle-bracket-type-assertion #332

@ThomasdenH

Description

@ThomasdenH

I would like to have a more general version of @typescript-eslint/no-angle-bracket-type-assertion, maybe called type-assertion. It would have two options, that can be enabled independently:

no-angle-bracket: If this is enabled, angle bracket type assertions are disallowed.
no-as: If this is enabled, as type assertions are disallowed.

This would allow different use cases. Some people like to use the old assertions instead of the new ones. Personally, I would like to lint all type casting since they introduce unsafety.

The default behaviour would be ['no-angle-bracket'] to match the current situation. If no options are enabled, the lint could warn that the lint can be disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement: plugin rule optionNew rule option for an existing eslint-plugin rulehas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    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