File tree Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,15 @@ export default iterateJsdoc(({
1212 tag : targetTagName
1313 } ) ;
1414
15+ if ( utils . hasTag ( 'private' ) ) {
16+ return ;
17+ }
18+
1519 if ( _ . isEmpty ( functionExamples ) ) {
16- return report ( 'Missing JSDoc @' + targetTagName + ' declaration.' ) ;
20+ report ( 'Missing JSDoc @' + targetTagName + ' declaration.' ) ;
1721 }
1822
19- return _ . forEach ( functionExamples , ( example ) => {
23+ _ . forEach ( functionExamples , ( example ) => {
2024 const exampleContent = _ . compact ( ( example . name + ' ' + example . description ) . trim ( ) . split ( '\n' ) ) ;
2125
2226 if ( _ . isEmpty ( exampleContent ) ) {
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ export default iterateJsdoc(({
88 const functionParameterNames = utils . getFunctionParameterNames ( ) ;
99 const jsdocParameterNames = utils . getJsdocParameterNames ( ) ;
1010
11+ if ( utils . hasTag ( 'private' ) ) {
12+ return ;
13+ }
14+
1115 // inheritdoc implies that all documentation is inherited; see http://usejsdoc.org/tags-inheritdoc.html
1216 if ( utils . hasTag ( 'inheritdoc' ) ) {
1317 return ;
Original file line number Diff line number Diff line change @@ -67,6 +67,15 @@ export default {
6767 */
6868 function quux () {
6969
70+ }
71+ `
72+ } ,
73+ {
74+ code : `
75+ /**
76+ * @private
77+ */
78+ function quux () {
7079 }
7180 `
7281 }
Original file line number Diff line number Diff line change @@ -133,6 +133,15 @@ export default {
133133 allowOverrideWithoutParam : true
134134 }
135135 }
136+ } ,
137+ {
138+ code : `
139+ /**
140+ * @private
141+ */
142+ function quux (foo) {
143+ }
144+ `
136145 }
137146 ]
138147} ;
You can’t perform that action at this time.
0 commit comments