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

@private shouldn't require anything #78

Closed
henriklundgren opened this issue Aug 18, 2018 · 10 comments
Closed

@private shouldn't require anything #78

henriklundgren opened this issue Aug 18, 2018 · 10 comments

Comments

@henriklundgren
Copy link
Contributor

/**
 * @private
 */
function myPrivateFunc() {}
@gajus gajus added the bug label Aug 18, 2018
@gajus
Copy link
Owner

gajus commented Aug 18, 2018

Fix welcome.

@brokentone
Copy link
Contributor

More details about what "anything" is would be helpful. All rules should be skipped? There is a particular error for the single parameter which should be skipped?

@henriklundgren
Copy link
Contributor Author

henriklundgren commented Aug 22, 2018

@brokentone I would think that all rules should be skipped. @private is by definition excluded from documentation and shouldn't be linted (or at least no reason to lint it).

@gajus gajus closed this as completed Aug 23, 2018
@brokentone
Copy link
Contributor

Sorry, I suppose I'm late on the draw here. I would tend to disagree with this reasoning. jsdocs are not just for public users, they can also be useful internally. I for one would be confused of I lost all validation if I added the @private param -- minimally this would need clear documentation.

That said, were this a desired feature for people, perhaps it's a global setting which gets applied to all rules

@henriklundgren
Copy link
Contributor Author

I would say that jsdoc is for public documentation.
Internal doc probably better suited with line comments.

/**
 * @function
 * @param {Object} x - awesome object
 */
function getPoint(x)  {
  const result = ccalulcatePoint(x);
}

// named it dubble cc to avoid monsters
function ccalculatePoint() {}

@gajus gajus reopened this Aug 23, 2018
gajus added a commit that referenced this issue Aug 23, 2018
* Revert "feat: set line locations when reporting violations (#88)"

This reverts commit 95df73e.

* Revert "fix: @ private skip require checks (#86)"

This reverts commit 767a788.
@gajus
Copy link
Owner

gajus commented Aug 23, 2018

I reverted the changes until broader consensus is reached. I agree with @brokentone that:

jsdocs are not just for public users, they can also be useful internally. I for one would be confused of I lost all validation if I added the @Private param -- minimally this would need clear documentation.

@gajus gajus added enhancement and removed bug labels Aug 23, 2018
@zakkudo
Copy link

zakkudo commented Oct 2, 2018

I hit the same issue, but my assumption is that this should be configurable. jsdoc is for public documentation, but @private is meant to keep something from being documented publicly. Whether that means no validation is a separate issue.

In my case, I would prefer not to have to document params when @private has been set. This would mean adding an extra option to the params validation and no the @private validation itself.

@zakkudo
Copy link

zakkudo commented Oct 2, 2018

If you want me to make a proof of concept I'm open to that. This change as it is also probably breaks a lot of user exceptions of how validation works which is bad. Extra options for other validation to be ignored when @private is set won't break current validation.

brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 15, 2019
…d code (see requireParam in this commit) to other rules like requireReturns

- `ignorePrivate` setting toward gajus#78
@brettz9
Copy link
Collaborator

brettz9 commented May 15, 2019

I've started a branch for this (via an optional (off by default) ignorePrivate setting), but waiting on a bunch of PRs to avoid merge conflict troubles.

brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 15, 2019
…d code (see requireParam in this commit) to other rules like requireReturns

- `ignorePrivate` setting toward gajus#78
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 15, 2019
…d code (see requireParam in this commit) to other rules like requireReturns

- `ignorePrivate` setting toward gajus#78
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 15, 2019
…d code (see requireParam in this commit) to other rules like requireReturns

- `ignorePrivate` setting toward gajus#78
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…d code (see requireParam in this commit) to other rules like requireReturns

- `ignorePrivate` setting toward gajus#78
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…d code (see requireParam in this commit) to other rules like requireReturns

- `ignorePrivate` setting toward gajus#78
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…d code (see requireParam in this commit) to other rules like requireReturns

- `ignorePrivate` setting toward gajus#78
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 16, 2019
…is in `requireParam` in this commit to other rules like requireReturns

- `ignorePrivate` setting toward gajus#78
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 17, 2019
…is in `requireParam` in this commit to other rules like requireReturns

- `ignorePrivate` setting toward gajus#78
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 17, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue May 17, 2019
brettz9 added a commit that referenced this issue May 17, 2019
- `ignorePrivate` setting; fixes #78
@gajus
Copy link
Owner

gajus commented May 21, 2019

🎉 This issue has been resolved in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants