Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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

Closed
RebeccaStevens opened this issue Mar 27, 2020 · 0 comments · Fixed by #1814
Labels
enhancement: new base rule extension New base rule extension required to handle a TS specific case has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@RebeccaStevens
Copy link
Contributor

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
@RebeccaStevens RebeccaStevens added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Mar 27, 2020
@bradzacher bradzacher added enhancement: new base rule extension New base rule extension required to handle a TS specific case and removed triage Waiting for maintainers to take a look labels Mar 27, 2020
@bradzacher bradzacher added the has pr there is a PR raised to close this label Mar 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: new base rule extension New base rule extension required to handle a TS specific case has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants