eslint-plugin-no-jquery
Advanced tools
Comparing version
{ | ||
"name": "eslint-plugin-no-jquery", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Disallow jQuery functions with native equivalents.", | ||
@@ -37,3 +37,3 @@ "repository": { | ||
"codecov": "^3.8.3", | ||
"eslint-config-wikimedia": "^0.28.2", | ||
"eslint-config-wikimedia": "^0.29.0", | ||
"eslint-docgen": "^0.7.1", | ||
@@ -44,4 +44,4 @@ "eslint-plugin-eslint-plugin": "^6.1.0", | ||
"jsdom": "^22.1.0", | ||
"mocha": "^10.2.0", | ||
"nyc": "^15.1.0" | ||
"mocha": "^11.1.0", | ||
"nyc": "^17.1.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "bugs": { |
@@ -37,12 +37,19 @@ 'use strict'; | ||
const allowScroll = context.options[ 0 ] && context.options[ 0 ].allowScroll; | ||
if ( node.callee.property.name === 'animate' && allowScroll ) { | ||
const arg = node.arguments[ 0 ]; | ||
// Check properties list has more than just scrollTop/scrollLeft | ||
if ( arg && arg.type === 'ObjectExpression' ) { | ||
if ( | ||
arg.properties.every( | ||
( prop ) => prop.key.name === 'scrollTop' || prop.key.name === 'scrollLeft' | ||
) | ||
) { | ||
return; | ||
const name = node.callee.property.name; | ||
if ( allowScroll ) { | ||
if ( name === 'stop' || name === 'finish' ) { | ||
// We can't tell what animation we are stopping, so assume | ||
// it is an allowed scroll | ||
return; | ||
} else if ( name === 'animate' ) { | ||
const arg = node.arguments[ 0 ]; | ||
// Check properties list has more than just scrollTop/scrollLeft | ||
if ( arg && arg.type === 'ObjectExpression' ) { | ||
if ( | ||
arg.properties.every( | ||
( prop ) => prop.key.name === 'scrollTop' || prop.key.name === 'scrollLeft' | ||
) | ||
) { | ||
return; | ||
} | ||
} | ||
@@ -49,0 +56,0 @@ } |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
95681
0.23%141537
11.67%2787
0.25%