From 75fd0137a7e48191f2f64732508f396689647087 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Wed, 17 Jun 2020 17:28:02 +0800 Subject: [PATCH] refactor: make clearer logic (though no effect in this case given how variable used) --- src/rules/validTypes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules/validTypes.js b/src/rules/validTypes.js index e0d68de4c..1a8e9e23c 100644 --- a/src/rules/validTypes.js +++ b/src/rules/validTypes.js @@ -76,7 +76,7 @@ export default iterateJsdoc(({ const hasNameOrNamepathPosition = utils.tagMightHaveNamePosition(tag.tag) && Boolean(tag.name) && !(tag.tag === 'see' && !checkSeesForNamepaths); const mustHaveNameOrNamepathPosition = utils.tagMustHaveNamePosition(tag.tag) && !allowEmptyNamepaths; - const hasEither = utils.tagMightHaveEitherTypeOrNamePosition(tag.tag) && hasTypePosition || hasNameOrNamepathPosition; + const hasEither = utils.tagMightHaveEitherTypeOrNamePosition(tag.tag) && (hasTypePosition || hasNameOrNamepathPosition); const mustHaveEither = utils.tagMustHaveEitherTypeOrNamePosition(tag.tag); if (tag.tag === 'borrows') {