Skip to content

[consistent-type-assertions] assertionStyle doesn't enforces <const> case #4684

@gtkatakura

Description

@gtkatakura
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

const example = <const>{ key: 'value' }
{
  "rules": {
    "@typescript-eslint/consistent-type-assertions": ["error", {"assertionStyle":"as"}]
  }
}

Expected Result

Should complains about the const forcing to use as const.

Actual Result

assertionStyle doesn't has impact over <const> or as const today

Versions

package version
@typescript-eslint/eslint-plugin 5.15.0
@typescript-eslint/parser 5.15.0
TypeScript 3.9.10
ESLint 7.32.0
node 14.17.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: 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