Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-global-jquery flags a pattern incorrectly #211

Closed
ghost opened this issue Jan 10, 2018 · 4 comments · Fixed by #1063 or #1066
Closed

no-global-jquery flags a pattern incorrectly #211

ghost opened this issue Jan 10, 2018 · 4 comments · Fixed by #1063 or #1066
Labels

Comments

@ghost
Copy link

ghost commented Jan 10, 2018

no-global-jquery errors based on the following snippet:

function firstRowText($) {
	return $('table tbody tr td:first-child').text().replace(/\s/g, '');
}

This is not a global instance, so the rule should not error here.
I see 2 quick workarounds:

  1. rename the function argument to be something else
  2. add //eslint-disable-next-line ember/no-global-jquery before the line
@rwjblue
Copy link
Member

rwjblue commented Jan 10, 2018

I'd prefer:

  1. fix the rule 😸

@rwjblue rwjblue added the bug label Jan 10, 2018
@rwjblue
Copy link
Member

rwjblue commented Jan 10, 2018

Good catch, thank you for reporting!

@ghost
Copy link
Author

ghost commented Jan 10, 2018

anytime!

@bmish
Copy link
Member

bmish commented Jan 11, 2021

Fixed by #1063 and #1066.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants