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

Add lint error for declarations marked internal, but unexported #58229

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

jakebailey
Copy link
Member

This should make #56817 easier to reason about, since knip --fix doesn't remove @internal or anything.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Apr 17, 2024
@@ -23,6 +24,31 @@ module.exports = createRule({
const atInternal = "@internal";
const jsdocStart = "/**";

/** @type {Map<import("@typescript-eslint/utils").TSESTree.Node, boolean>} */
const isExportedCache = new Map();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This closure is created per-file so there's no leaking happening here via the Map.

@jakebailey jakebailey merged commit 967d618 into microsoft:main Apr 17, 2024
25 checks passed
@jakebailey jakebailey deleted the eslint-unexported-at-internal branch April 17, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants