Skip to content

Commit ea1a626

Browse files
committed
fix(check-param-names): use ponyfill as such; avoid defining Object.entries when not present
1 parent 5543c29 commit ea1a626

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/rules/checkParamNames.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
import entries from 'object.entries-ponyfill';
22
import iterateJsdoc from '../iterateJsdoc';
33

4-
/* istanbul ignore next */
5-
if (!Object.entries) {
6-
Object.entries = entries;
7-
}
8-
94
const validateParameterNames = (targetTagName : string, functionParameterNames : Array<string>, jsdoc, jsdocNode, utils, report) => {
105
if (!jsdoc || !jsdoc.tags) {
116
return false;
127
}
138

14-
const paramTags = Object.entries(jsdoc.tags).filter(([, tag]) => {
9+
const paramTags = entries(jsdoc.tags).filter(([, tag]) => {
1510
return tag.tag === targetTagName && !tag.name.includes('.');
1611
});
1712

0 commit comments

Comments
 (0)