eslint-plugin-unicorn
Advanced tools
Comparing version 32.0.0 to 32.0.1
{ | ||
"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; |
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
382486