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

eslint-plugin-dollar-sign

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-dollar-sign - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

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

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