Skip to content

Commit b02f40a

Browse files
committed
chore: linting
1 parent bb3b75c commit b02f40a

6 files changed

+13
-17
lines changed

Diff for: src/iterateJsdoc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ const getUtils = (
343343
postName = '';
344344
} else if (postType) {
345345
postType = '';
346-
// eslint-disable-next-line max-len, no-inline-comments
346+
// eslint-disable-next-line no-inline-comments
347347
} else /* istanbul ignore else -- `comment-parser` prevents empty blocks currently per https://github.com/syavorsky/comment-parser/issues/128 */ if (postTag) {
348348
postTag = '';
349349
}
@@ -1025,6 +1025,7 @@ const checkFile = (iterator, ruleConfig) => {
10251025

10261026
export {
10271027
getSettings,
1028+
// eslint-disable-next-line unicorn/prefer-export-from -- Avoid experimental parser
10281029
parseComment,
10291030
};
10301031

Diff for: src/jsdocUtils.js

-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ const getJsdocTagsDeep = (jsdoc : Object, targetTagName : string) : Array<Object
268268
return ret;
269269
};
270270

271-
// eslint-disable-next-line @babel/new-cap
272271
const modeWarnSettings = WarnSettings();
273272

274273
const getTagNamesForMode = (mode, context) => {

Diff for: src/rules/checkTypes.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,17 @@ export default iterateJsdoc(({
210210
if (invalidTypes.length) {
211211
const fixedType = stringify(typeAst);
212212

213-
for (const [badType, preferredType = '', message] of invalidTypes) {
214-
const fix = (fixer) => {
215-
return fixer.replaceText(
216-
jsdocNode,
217-
sourceCode.getText(jsdocNode).replace(
218-
`{${jsdocTag.type}}`,
219-
`{${fixedType}}`,
220-
),
221-
);
222-
};
213+
const fix = (fixer) => {
214+
return fixer.replaceText(
215+
jsdocNode,
216+
sourceCode.getText(jsdocNode).replace(
217+
`{${jsdocTag.type}}`,
218+
`{${fixedType}}`,
219+
),
220+
);
221+
};
223222

223+
for (const [badType, preferredType = '', message] of invalidTypes) {
224224
const tagValue = jsdocTag.name ? ` "${jsdocTag.name}"` : '';
225225
if (exemptTagContexts.some(({tag, types}) => {
226226
return tag === tagName &&

Diff for: src/rules/requireDescriptionCompleteSentence.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const extractSentences = (text, abbreviationsRegex) => {
2727

2828
const sentenceEndGrouping = /([.?!])(?:\s+|$)/u;
2929

30-
// eslint-disable-next-line unicorn/no-array-method-this-argument, unicorn/no-array-callback-reference
30+
// eslint-disable-next-line unicorn/no-array-method-this-argument
3131
const puncts = new RegExtras(sentenceEndGrouping).map(txt, (punct) => {
3232
return punct;
3333
});

Diff for: test/iterateJsdoc.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable max-nested-callbacks */
2-
31
import {
42
expect,
53
} from 'chai';

Diff for: test/jsdocUtils.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable max-nested-callbacks */
2-
31
import {
42
expect,
53
} from 'chai';

0 commit comments

Comments
 (0)