Socket
Socket
Sign inDemoInstall

eslint-plugin-unicorn

Package Overview
Dependencies
Maintainers
1
Versions
105
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 32.0.0 to 32.0.1

2

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

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

@@ -124,5 +124,3 @@ 'use strict';

'FunctionExpression',
'ArrowFunctionExpression',
'ObjectMethod',
'ClassMethod'
'ArrowFunctionExpression'
]);

@@ -129,0 +127,0 @@

'use strict';
const hasSameRange = require('./has-same-range');
const isShorthandExportLocal = identifier =>
identifier.parent.type === 'ExportSpecifier' &&
identifier.parent.exported === identifier &&
identifier.parent.local === identifier;
const isShorthandExportLocal = node => {
const {type, local, exported} = node.parent;
return type === 'ExportSpecifier' && hasSameRange(local, exported) && local === node;
};
module.exports = isShorthandExportLocal;
'use strict';
const hasSameRange = require('./has-same-range');
const isShorthandImportIdentifier = identifier =>
identifier.parent.type === 'ImportSpecifier' &&
identifier.parent.imported === identifier &&
identifier.parent.local === identifier;
const isShorthandImportLocal = node => {
const {type, local, imported} = node.parent;
return type === 'ImportSpecifier' && hasSameRange(local, imported) && local === node;
};
module.exports = isShorthandImportIdentifier;
module.exports = isShorthandImportLocal;
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