feat(linter/eslint/no-inner-declarations): add namespaces option#24044
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
5224fca to
fd3f6f3
Compare
Merge activity
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd3f6f3c02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fd3f6f3 to
8e6d39c
Compare
8e6d39c to
a586e6e
Compare
a586e6e to
679ef4b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 679ef4b2a0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
679ef4b to
e65a6b2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e65a6b28c0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…24044) Adds a `namespaces` option to `eslint/no-inner-declarations`: ```json ["error", "both", { "namespaces": "allow" }] ``` With `namespaces: "allow"`, `function`/`var` declarations placed directly inside a TypeScript `namespace`/`module` body are no longer reported. Declarations nested inside blocks within a namespace (e.g. `namespace N { if (x) { function f() {} } }`) are still reported. The default (`disallow`) is unchanged. Closes #21143
e65a6b2 to
0433a83
Compare
Adds a
namespacesoption toeslint/no-inner-declarations:With
namespaces: "allow",function/vardeclarations placed directly inside a TypeScriptnamespace/modulebody are no longer reported. Declarations nested inside blocks within a namespace (e.g.namespace N { if (x) { function f() {} } }) are still reported. The default (disallow) is unchanged.Closes #21143