Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-unicorn

Package Overview
Dependencies
Maintainers
3
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 4.0.2 to 4.0.3

2

package.json
{
"name": "eslint-plugin-unicorn",
"version": "4.0.2",
"version": "4.0.3",
"description": "Various awesome ESLint rules",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -118,3 +118,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -121,0 +121,0 @@ schema

@@ -135,3 +135,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -138,0 +138,0 @@ fixable: 'code'

@@ -94,5 +94,5 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
}
}
};

@@ -59,3 +59,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -62,0 +62,0 @@ fixable: 'code'

@@ -157,3 +157,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -160,0 +160,0 @@ fixable: 'code',

@@ -119,3 +119,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -122,0 +122,0 @@ schema

@@ -29,3 +29,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -32,0 +32,0 @@ fixable: 'code'

@@ -70,3 +70,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -73,0 +73,0 @@ fixable: 'code'

@@ -35,5 +35,5 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
}
}
};

@@ -23,3 +23,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -26,0 +26,0 @@ fixable: 'code'

@@ -52,3 +52,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -55,0 +55,0 @@ fixable: 'code'

@@ -32,3 +32,3 @@ /* eslint-disable unicorn/no-hex-escape */

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -35,0 +35,0 @@ fixable: 'code'

@@ -28,3 +28,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -31,0 +31,0 @@ fixable: 'code'

@@ -43,5 +43,5 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
}
}
};

@@ -56,5 +56,5 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
}
}
};

@@ -36,3 +36,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -39,0 +39,0 @@ fixable: 'code'

@@ -48,3 +48,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -51,0 +51,0 @@ fixable: 'code'

@@ -15,2 +15,4 @@ 'use strict';

const isArrayLike = arg => arg && arg.type !== 'ObjectExpression';
const parseArgument = (context, arg) => {

@@ -27,3 +29,3 @@ if (arg.type === 'Identifier') {

CallExpression(node) {
if (isArrayFrom(node)) {
if (isArrayFrom(node) && isArrayLike(node.arguments[0])) {
context.report({

@@ -56,3 +58,3 @@ node,

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -59,0 +61,0 @@ fixable: 'code'

@@ -56,5 +56,5 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
}
}
};

@@ -123,3 +123,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -126,0 +126,0 @@ fixable: 'code'

@@ -65,3 +65,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -68,0 +68,0 @@ fixable: 'code'

@@ -25,3 +25,3 @@ 'use strict';

docs: {
url: getDocsUrl()
url: getDocsUrl(__filename)
},

@@ -28,0 +28,0 @@ fixable: 'code'

@@ -7,5 +7,5 @@ 'use strict';

module.exports = ruleName => {
ruleName = ruleName || path.basename(module.parent.filename, '.js');
module.exports = filename => {
const ruleName = path.basename(filename, '.js');
return `${repoUrl}/blob/v${pkg.version}/docs/rules/${ruleName}.md`;
};
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