File tree Expand file tree Collapse file tree 5 files changed +55
-3
lines changed Expand file tree Collapse file tree 5 files changed +55
-3
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ supplied as the second argument in an array after the error level.
111
111
### Allow ` @private ` to disable rules for that comment block
112
112
113
113
- ` settings.jsdoc.ignorePrivate ` - Disables all rules for the comment block
114
- on which a ` @private ` tag occurs. Defaults to
114
+ on which a ` @private ` tag (or ` @access private ` ) occurs. Defaults to
115
115
` false ` . Note: This has no effect with the rule ` check-access ` (whose
116
116
purpose is to check access modifiers).
117
117
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ supplied as the second argument in an array after the error level.
158
158
### Allow <code >@private </code > to disable rules for that comment block
159
159
160
160
- ` settings.jsdoc.ignorePrivate ` - Disables all rules for the comment block
161
- on which a ` @private ` tag occurs. Defaults to
161
+ on which a ` @private ` tag (or ` @access private ` ) occurs. Defaults to
162
162
` false ` . Note: This has no effect with the rule ` check-access ` (whose
163
163
purpose is to check access modifiers).
164
164
@@ -683,6 +683,15 @@ function quux (foo) {
683
683
// with spaces
684
684
}
685
685
// Settings: {"jsdoc":{"ignorePrivate":true}}
686
+
687
+ /**
688
+ * @param {Number} foo
689
+ * @access private
690
+ */
691
+ function quux (foo ) {
692
+ // with spaces
693
+ }
694
+ // Settings: {"jsdoc":{"ignorePrivate":true}}
686
695
````
687
696
688
697
@@ -8361,6 +8370,14 @@ function quux (foo) {
8361
8370
}
8362
8371
// Settings: {"jsdoc":{"ignorePrivate":true}}
8363
8372
8373
+ /**
8374
+ * @access private
8375
+ */
8376
+ function quux (foo ) {
8377
+
8378
+ }
8379
+ // Settings: {"jsdoc":{"ignorePrivate":true}}
8380
+
8364
8381
// issue 182: optional chaining
8365
8382
/** @const {boolean} test */
8366
8383
const test = something? .find (_ => _)
Original file line number Diff line number Diff line change @@ -450,7 +450,11 @@ const iterate = (
450
450
if (
451
451
settings . ignorePrivate &&
452
452
! ruleConfig . checkPrivate &&
453
- utils . hasTag ( 'private' )
453
+ ( utils . hasTag ( 'private' ) || _ . filter ( jsdoc . tags , {
454
+ tag : 'access' ,
455
+ } ) . some ( ( { description} ) => {
456
+ return description === 'private' ;
457
+ } ) )
454
458
) {
455
459
return ;
456
460
}
Original file line number Diff line number Diff line change @@ -276,5 +276,21 @@ function quux (foo) {
276
276
} ,
277
277
} ,
278
278
} ,
279
+ {
280
+ code : `
281
+ /**
282
+ * @param {Number} foo
283
+ * @access private
284
+ */
285
+ function quux (foo) {
286
+ // with spaces
287
+ }
288
+ ` ,
289
+ settings : {
290
+ jsdoc : {
291
+ ignorePrivate : true ,
292
+ } ,
293
+ } ,
294
+ } ,
279
295
] ,
280
296
} ;
Original file line number Diff line number Diff line change @@ -910,6 +910,21 @@ export default {
910
910
} ,
911
911
} ,
912
912
} ,
913
+ {
914
+ code : `
915
+ /**
916
+ * @access private
917
+ */
918
+ function quux (foo) {
919
+
920
+ }
921
+ ` ,
922
+ settings : {
923
+ jsdoc : {
924
+ ignorePrivate : true ,
925
+ } ,
926
+ } ,
927
+ } ,
913
928
{
914
929
code : `
915
930
// issue 182: optional chaining
You can’t perform that action at this time.
0 commit comments