Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[no-namespace] Adding 'export' yields false positive when allowDeclarations=trueΒ #4843

Closed
@zachkirsch

Description

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

        "@typescript-eslint/no-namespace": [
            "error",
            {
                allowDeclarations: true,
            },
        ],

This doesn't produce any warnings if allowDeclarations is true

declare namespace foo {
    namespace bar {
        namespace baz {}
    }
}

This DOES produce a warning if allowDeclarations is true

declare namespace foo {
    export namespace bar {
        namespace baz {}
    }
}

Expected Result

If allowDeclarations is true, then neither should error.

Actual Result

Including export causes the rule to complain.

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 5.17.0
@typescript-eslint/parser 5.17.0
TypeScript 4.6.3
ESLint 8.12.0
node 17.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

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