feat: add no-runtime-private methods rule#1476
Open
tobias47n9e wants to merge 1 commit into
Open
Conversation
6b5ff94 to
4cfdaf4
Compare
4cfdaf4 to
5d14272
Compare
Contributor
Contributor
Author
|
@0f-0b For me it is also about the watch functionality of the debugger. I cannot easily check on nested methods and fields that have the this.#database.#somePrivateMethod()this.#database.#privateFieldIt could be out of scope for deno lint, but I just wanted to check if something like this would be considered 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This optional rule discourages the usage of methods with
#-prefix in favor ofprivate method. This encourages users to trust typescript'sprivatekeyword and does not prevent debuggers from accessing the method.Note: I would like to make a similar rule for
#-prefixed instance properties. Those are also not accessible by Deno debug, and I think it would be good if the linter could discourage using them.