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

Skip to content

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

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

Closed
3 tasks done
zachkirsch opened this issue Apr 20, 2022 · 0 comments · Fixed by #4844
Closed
3 tasks done

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

zachkirsch opened this issue Apr 20, 2022 · 0 comments · Fixed by #4844
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working good first issue Good for newcomers package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@zachkirsch
Copy link
Contributor

zachkirsch commented Apr 20, 2022

  • 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
@zachkirsch zachkirsch added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Apr 20, 2022
@JoshuaKGoldberg JoshuaKGoldberg added bug Something isn't working good first issue Good for newcomers accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Apr 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working good first issue Good for newcomers package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants