Skip to content

Commit b132a6c

Browse files
authored
fix: revert @ private skip require checks (issue #78) (#89)
* Revert "feat: set line locations when reporting violations (#88)" This reverts commit 95df73e. * Revert "fix: @ private skip require checks (#86)" This reverts commit 767a788.
1 parent 95df73e commit b132a6c

File tree

4 files changed

+2
-28
lines changed

4 files changed

+2
-28
lines changed

src/rules/requireExample.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,11 @@ export default iterateJsdoc(({
1212
tag: targetTagName
1313
});
1414

15-
if (utils.hasTag('private')) {
16-
return;
17-
}
18-
1915
if (_.isEmpty(functionExamples)) {
20-
report('Missing JSDoc @' + targetTagName + ' declaration.');
16+
return report('Missing JSDoc @' + targetTagName + ' declaration.');
2117
}
2218

23-
_.forEach(functionExamples, (example) => {
19+
return _.forEach(functionExamples, (example) => {
2420
const exampleContent = _.compact((example.name + ' ' + example.description).trim().split('\n'));
2521

2622
if (_.isEmpty(exampleContent)) {

src/rules/requireParam.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ export default iterateJsdoc(({
88
const functionParameterNames = utils.getFunctionParameterNames();
99
const jsdocParameterNames = utils.getJsdocParameterNames();
1010

11-
if (utils.hasTag('private')) {
12-
return;
13-
}
14-
1511
// inheritdoc implies that all documentation is inherited; see http://usejsdoc.org/tags-inheritdoc.html
1612
if (utils.hasTag('inheritdoc')) {
1713
return;

test/rules/assertions/requireExample.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ export default {
6767
*/
6868
function quux () {
6969
70-
}
71-
`
72-
},
73-
{
74-
code: `
75-
/**
76-
* @private
77-
*/
78-
function quux () {
7970
}
8071
`
8172
}

test/rules/assertions/requireParam.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,6 @@ export default {
133133
allowOverrideWithoutParam: true
134134
}
135135
}
136-
},
137-
{
138-
code: `
139-
/**
140-
* @private
141-
*/
142-
function quux (foo) {
143-
}
144-
`
145136
}
146137
]
147138
};

0 commit comments

Comments
 (0)