eslint-plugin-unicorn
Advanced tools
Comparing version 12.0.0 to 12.0.1
{ | ||
"name": "eslint-plugin-unicorn", | ||
"version": "12.0.0", | ||
"version": "12.0.1", | ||
"description": "Various awesome ESLint rules", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -20,3 +20,4 @@ 'use strict'; | ||
const pkg = readPkgUp.sync().package; | ||
const hasPackage = readPkgUp.sync(); | ||
const pkg = hasPackage ? hasPackage.package : {}; | ||
@@ -72,3 +73,3 @@ const pkgDependencies = { | ||
if (DEPENDENCY_INCLUSION_RE.test(argumentString)) { | ||
if (hasPackage && DEPENDENCY_INCLUSION_RE.test(argumentString)) { | ||
const condition = argumentString[0] === '+' ? 'in' : 'out'; | ||
@@ -86,3 +87,3 @@ const name = argumentString.slice(1).trim(); | ||
if (VERSION_COMPARISON_RE.test(argumentString)) { | ||
if (hasPackage && VERSION_COMPARISON_RE.test(argumentString)) { | ||
const result = VERSION_COMPARISON_RE.exec(argumentString); | ||
@@ -118,3 +119,3 @@ const name = result[1].trim(); | ||
if (PKG_VERSION_RE.test(argumentString)) { | ||
if (hasPackage && PKG_VERSION_RE.test(argumentString)) { | ||
const result = PKG_VERSION_RE.exec(argumentString); | ||
@@ -180,7 +181,3 @@ const condition = result[1].trim(); | ||
const options = { | ||
terms: [ | ||
'todo', | ||
'fixme', | ||
'xxx' | ||
], | ||
terms: ['todo', 'fixme', 'xxx'], | ||
ignoreDatesOnPullRequests: true, | ||
@@ -355,5 +352,3 @@ allowWarningComments: false, | ||
data: { | ||
comparison: `${dependency.name} ${dependency.condition} ${ | ||
dependency.version | ||
}`, | ||
comparison: `${dependency.name} ${dependency.condition} ${dependency.version}`, | ||
message: parseTodoMessage(comment.value) | ||
@@ -403,3 +398,6 @@ } | ||
if (!hasAt && comparisonIndex !== -1) { | ||
const testString = `${unknown.slice(0, comparisonIndex)}@${unknown.slice(comparisonIndex)}`; | ||
const testString = `${unknown.slice( | ||
0, | ||
comparisonIndex | ||
)}@${unknown.slice(comparisonIndex)}`; | ||
@@ -406,0 +404,0 @@ if (parseArgument(testString).type !== 'unknowns') { |
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
156949
4965