Socket
Socket
Sign inDemoInstall

eslint-plugin-unicorn

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-unicorn - npm Package Compare versions

Comparing version 12.0.0 to 12.0.1

2

package.json
{
"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') {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc