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

Cannot disable no-jquery for whole file #1500

Closed
locks opened this issue Jun 22, 2022 · 2 comments
Closed

Cannot disable no-jquery for whole file #1500

locks opened this issue Jun 22, 2022 · 2 comments

Comments

@locks
Copy link
Contributor

locks commented Jun 22, 2022

I have a file that is using jQuery, so I added an /* eslint-ignore ember/no-jquery */ at the top, to disable it for the whole file.
However, it still errors until I add an eslint-disable-next-line declaration right before the jQuery usage.

@bmish
Copy link
Member

bmish commented Jun 22, 2022

Try:

/* eslint "ember/no-jquery":off */

Related explanation: mysticatea/eslint-plugin-eslint-comments#60

@bmish
Copy link
Member

bmish commented Jul 7, 2022

Note that the reason the above comment style is needed for this particular rule is that this rule does a search for jQuery references as soon as it sees the Program node for the file (before any line-specific disable comment would have been applied):

@bmish bmish closed this as completed Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants