Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 882 Bytes

no-is-array.md

File metadata and controls

35 lines (24 loc) · 882 Bytes

no-is-array

Disallows the $.isArray utility. Prefer Array.isArray.

📋 This rule is enabled in plugin:no-jquery/deprecated-3.2.

📋 This rule is enabled in plugin:no-jquery/all.

🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

Rule details

❌ Examples of incorrect code:

$.isArray( [] );

✔️ Examples of correct code:

isArray();
'test'.isArray();
'test'.isArray;

🔧 Examples of code fixed by this rule:

$.isArray( [] ); /* → */ Array.isArray( [] );

Resources