Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Nov 29, 2021
1 parent bb3b75c commit b02f40a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
3 changes: 2 additions & 1 deletion src/iterateJsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ const getUtils = (
postName = '';
} else if (postType) {
postType = '';
// eslint-disable-next-line max-len, no-inline-comments
// eslint-disable-next-line no-inline-comments
} else /* istanbul ignore else -- `comment-parser` prevents empty blocks currently per https://github.com/syavorsky/comment-parser/issues/128 */ if (postTag) {
postTag = '';
}
Expand Down Expand Up @@ -1025,6 +1025,7 @@ const checkFile = (iterator, ruleConfig) => {

export {
getSettings,
// eslint-disable-next-line unicorn/prefer-export-from -- Avoid experimental parser
parseComment,
};

Expand Down
1 change: 0 additions & 1 deletion src/jsdocUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ const getJsdocTagsDeep = (jsdoc : Object, targetTagName : string) : Array<Object
return ret;
};

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

const getTagNamesForMode = (mode, context) => {
Expand Down
20 changes: 10 additions & 10 deletions src/rules/checkTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,17 @@ export default iterateJsdoc(({
if (invalidTypes.length) {
const fixedType = stringify(typeAst);

for (const [badType, preferredType = '', message] of invalidTypes) {
const fix = (fixer) => {
return fixer.replaceText(
jsdocNode,
sourceCode.getText(jsdocNode).replace(
`{${jsdocTag.type}}`,
`{${fixedType}}`,
),
);
};
const fix = (fixer) => {
return fixer.replaceText(
jsdocNode,
sourceCode.getText(jsdocNode).replace(
`{${jsdocTag.type}}`,
`{${fixedType}}`,
),
);
};

for (const [badType, preferredType = '', message] of invalidTypes) {
const tagValue = jsdocTag.name ? ` "${jsdocTag.name}"` : '';
if (exemptTagContexts.some(({tag, types}) => {
return tag === tagName &&
Expand Down
2 changes: 1 addition & 1 deletion src/rules/requireDescriptionCompleteSentence.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const extractSentences = (text, abbreviationsRegex) => {

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

// eslint-disable-next-line unicorn/no-array-method-this-argument, unicorn/no-array-callback-reference
// eslint-disable-next-line unicorn/no-array-method-this-argument
const puncts = new RegExtras(sentenceEndGrouping).map(txt, (punct) => {
return punct;
});
Expand Down
2 changes: 0 additions & 2 deletions test/iterateJsdoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable max-nested-callbacks */

import {
expect,
} from 'chai';
Expand Down
2 changes: 0 additions & 2 deletions test/jsdocUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable max-nested-callbacks */

import {
expect,
} from 'chai';
Expand Down

0 comments on commit b02f40a

Please sign in to comment.