eslint-plugin-no-jquery 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-no-jquery",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Disallow jQuery functions with native equivalents.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,10 +30,14 @@ module.exports = {
30
30
  const name = node.callee.property.name;
31
31
  if (
32
32
  name !== 'extend' ||
33
- !utils.isjQueryConstructor( context, node.callee.object.name )
33
+ !utils.isjQueryConstructor( context, node.callee.object.name )
34
34
  ) {
35
35
  return;
36
36
  }
37
+ if ( node.arguments.length === 1 ) {
38
+ // $.extend with one argument merges the object onto the jQuery namespace
39
+ return;
40
+ }
37
41
  const allowDeep = context.options[ 0 ] && context.options[ 0 ].allowDeep;
38
42
  const isDeep = node.arguments[ 0 ] && node.arguments[ 0 ].value === true;
39
43
  if ( allowDeep && isDeep ) {