Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 921 Bytes

File metadata and controls

37 lines (25 loc) · 921 Bytes

no-now

Disallows the $.now utility. Prefer Date.now.

📋 This rule is enabled as an error in plugin:no-jquery/deprecated-4.0.

📋 This rule is enabled as a warning in plugin:no-jquery/deprecated-3.3.

📋 This rule is enabled as a warning 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:

$.now();

✔️ Examples of correct code:

now();
myClass.now();
$div.now();

🔧 Examples of code fixed by this rule:

$.now(); /* → */ Date.now();

Resources