question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule Proposal: jquery-dollar

See original GitHub issue

From 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 is false) - If this is true, this rule will ignore property names.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
lo1tumacommented, May 6, 2016

There is already a plugin for this: eslint-plugin-dollar-sign.

3reactions
nzakascommented, May 4, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found