Skip to content

[no-use-before-define] class reference in its decorator reports error even if with option classes: false #2824

@JounQin

Description

@JounQin
  • 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

{
  "rules": {
    "@typescript-eslint/no-use-before-define": [
      2,
      {
        "classes": false,
        "functions": false,
      },
    ]
  }
}
@Directive({
  selector: '[rcCidrIpPattern]',
  providers: [
    {
      provide: NG_VALIDATORS,
      useExisting: CidrIpPatternDirective,
      multi: true,
    },
  ],
})
export class CidrIpPatternDirective implements Validator {}

Expected Result

No error

Actual Result

error  'CidrIpPatternDirective' was used before it was defined      @typescript-eslint/no-use-before-define

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 4.8.2
@typescript-eslint/parser 4.8.2
TypeScript 4.0.5
ESLint 7.14.0
node 12.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething 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