Disallows the $.escapeSelector
utility. Prefer CSS.escape
.
📋 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.
❌ Examples of incorrect code:
$.escapeSelector( '.foo>' );
✔️ Examples of correct code:
escapeSelector( '.foo>' );
myClass.escapeSelector( '.foo>' );
$div.escapeSelector( '.foo>' );
🔧 Examples of code fixed by this rule:
$.escapeSelector( '.foo>' ); /* → */ CSS.escape( '.foo>' );