Skip to content

Commit

Permalink
chore: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Jun 20, 2021
1 parent aa0e236 commit 0bf7d82
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/rules/validTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ import iterateJsdoc from '../iterateJsdoc';

const asExpression = /as\s+/u;

const tryParsePathIgnoreError = (path) => {
try {
tryParse(path);

return true;
} catch {
// Keep the original error for including the whole type
}

return false;
};

export default iterateJsdoc(({
jsdoc,
report,
Expand All @@ -17,18 +29,6 @@ export default iterateJsdoc(({
} = context.options[0] || {};
const {mode} = settings;

const tryParsePathIgnoreError = (path) => {
try {
tryParse(path);

return true;
} catch {
// Keep the original error for including the whole type
}

return false;
};

// eslint-disable-next-line complexity
jsdoc.tags.forEach((tag) => {
const validNamepathParsing = function (namepath, tagName) {
Expand Down

0 comments on commit 0bf7d82

Please sign in to comment.