eslint-plugin-jsdoc
Advanced tools
Comparing version 50.4.0 to 50.4.1
@@ -155,3 +155,3 @@ { | ||
}, | ||
"version": "50.4.0" | ||
"version": "50.4.1" | ||
} |
@@ -41,4 +41,5 @@ import iterateJsdoc from '../iterateJsdoc.js'; | ||
for (const tag of applicableTags) { | ||
const allowed = !allowNameRegex || allowNameRegex.test(tag.name); | ||
const disallowed = disallowNameRegex && disallowNameRegex.test(tag.name); | ||
const tagName = tag.name.replace(/^\[/u, '').replace(/(=.*)?\]$/u, ''); | ||
const allowed = !allowNameRegex || allowNameRegex.test(tagName); | ||
const disallowed = disallowNameRegex && disallowNameRegex.test(tagName); | ||
const hasRegex = allowNameRegex || disallowNameRegex; | ||
@@ -70,6 +71,6 @@ if (hasRegex && allowed && !disallowed) { | ||
message = disallowed ? | ||
`Only allowing names not matching \`${disallowNameRegex}\` but found "${tag.name}".` : | ||
`Only allowing names matching \`${allowNameRegex}\` but found "${tag.name}".`; | ||
`Only allowing names not matching \`${disallowNameRegex}\` but found "${tagName}".` : | ||
`Only allowing names matching \`${allowNameRegex}\` but found "${tagName}".`; | ||
} else { | ||
message = `Prohibited context for "${tag.name}".`; | ||
message = `Prohibited context for "${tagName}".`; | ||
} | ||
@@ -91,3 +92,3 @@ } | ||
disallowName, | ||
name: tag.name, | ||
name: tagName, | ||
}, | ||
@@ -94,0 +95,0 @@ ); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2085388
33894