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

Forbid TypeScript's private modifier in favour of hash names #244

Merged
merged 2 commits into from
Oct 31, 2022

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Oct 31, 2022

private fields and methods in TypeScript are not truly private. They can still be accessed in runtime. Using hash names (e.g., #name) makes them truly private, enforced by JavaScript itself.

@Mrtenz Mrtenz requested a review from a team as a code owner October 31, 2022 10:22
@legobeat
Copy link
Contributor

$ node ./scripts/validate-configs.js

Error: Computed snapshot differs from the existing snapshot for the following package(s). Take a new snapshot and try again.

    @metamask/eslint-config-typescript

error Command failed with exit code 1.

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants