-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
- 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": {
"init-declarations": [0],
"@typescript-eslint/init-declarations": [2, "always"],
}
}
// index.d.ts
// eg.1
declare namespace obj {
const a: number
}
// eg.2
declare namespace obj1 {
declare const a: number
namespace obj1_1 {
const b: string // Error info: Variable 'b' should be initialized on declaration.
}
}
// eg.3
declare namespace obj2 {
const a: number
namespace obj2_2 {
declare const b: string
}
}
Expected Result
Expected that don't report error with const b: string
in eg.2
Actual Result
eg.1
and eg.3
is OK, but eg.2
was reported Variable 'b' should be initialized on declaration.
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
5.8.1 |
@typescript-eslint/parser |
5.8.1 |
TypeScript |
4.5.4 |
ESLint |
8.5.0 |
node |
16.13.1 |
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin