eslint-plugin-dollar-sign
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "eslint-plugin-dollar-sign", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Enforce $varName for jQuery assignment.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -53,7 +53,7 @@ /** | ||
function checkVariableDeclarator(node) { | ||
if (node.id.type === 'ObjectPattern' || node.id.type === 'ArrayPattern') { | ||
var left = node.id; | ||
if (left.type === 'ObjectPattern' || left.type === 'ArrayPattern') { | ||
return; | ||
} | ||
var left = node.id; | ||
var varName = left.name; | ||
@@ -70,2 +70,6 @@ var right = node.init; | ||
if (left.type === 'ObjectPattern' || left.type === 'ArrayPattern') { | ||
return; | ||
} | ||
if (left.property && ignoreProperties) { | ||
@@ -72,0 +76,0 @@ return; |
@@ -64,4 +64,10 @@ /** | ||
{ code: 'var {beep, boop} = meep;\nvar $s = $("#id")', ecmaFeatures: { destructuring: true } }, | ||
{ code: 'var {beep, boop} = $("#id")', ecmaFeatures: { destructuring: true } }, | ||
// object destructuring without var | ||
{ code: '({beep, boop} = $("#id"))', ecmaFeatures: { destructuring: true } }, | ||
// array destructuring | ||
{ code: 'var [beep, boop] = meep;\nvar $s = $("#id")', ecmaFeatures: { destructuring: true } }, | ||
{ code: 'var [beep, boop] = $("#id")', ecmaFeatures: { destructuring: true } }, | ||
// array destructuring without var | ||
{ code: '([beep, boop] = $("#id"))', ecmaFeatures: { destructuring: true } }, | ||
@@ -68,0 +74,0 @@ //// in object definition |
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
13860
423