Rule Proposal: jquery-dollar
See original GitHub issueFrom requireDollarBeforejQueryAssignment.
This rule will enforce variable names start with $
if the variable is initialized with a jQuery object.
I think this rule should be in eslint-plugin-jquery.
{
"jquery-dollar": ["error", {"ignoreProperties": false}]
}
ignoreProperties
(default isfalse
) - If this istrue
, this rule will ignore property names.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Jquery Validate Depends changing rule value of minimum
I'm trying to make the minimum dollar amount change when a different option is selected. The depends does not work as is.
Read more >What does dollar sign ($) means in jQuery ? - GeeksforGeeks
The $ sign is nothing but an identifier of jQuery() function. Instead of writing jQuery we simply write $ which is the same...
Read more >5 Easy Ways to Fix the "jQuery is Not Defined" Error - Kinsta
The "jQuery is not defined" error means a call for a specific jQuery that wasn't available when the website loaded. Here's how to...
Read more >How to use jQuery and require js in Magento 2? - Amasty
Learn to use base elements in Magento 2 jQuery to manage evens via JavaScript. Read this complete guide.
Read more >Part I: Introduction to jQuery
Using jQuery I. Selectors. ▷ jQuery allows you to select an element or a set of DOM elements. ▷ Use the dollar sign/parentheses...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There is already a plugin for this: eslint-plugin-dollar-sign.
I think our goal is to ensure compatibility with JSCS while still following our own guidelines. So in this case, I agree that this rule should be in a plugin. We can always point to the plugin as part of the JSCS compat documentation.