Skip to content

[init-declarations] eslint's JS version of this rule does not handle the case of TS declaration statements. We need a TS version of this rule. #1811

@RebeccaStevens

Description

@RebeccaStevens

eslint's init-declarations rule.

Repro

{
  "rules": {
    "init-declarations": ["error", "always"],
  }
}
declare const foo: number;

Expected Result

Type declarations should not cause an eslint rule violation.

Actual Result

The init-declarations rule raises a violation.

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 2.25.0
@typescript-eslint/parser 2.25.0
TypeScript 3.8.3
ESLint 6.8.0
node 12.4.0
npm 6.13.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement: new base rule extensionNew base rule extension required to handle a TS specific casehas 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