Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
General code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2024 at 08:37 UTC
Updated:
18 May 2024 at 10:44 UTC
Jump to comment: Most recent
Comments
Comment #2
jonathan1055 commentedI also have
error Prefer matches to $.is jquery/no-isfor source lines that are using.is(':checked')when writing summary text in tabs using.drupalSetSummary()I'm interested to see what you change to fix this.
Comment #4
drunken monkeyCreated this MR which should fix this.
However, not trivial to find out what
Prefer matches to $.isis supposed to mean, for a JS non-expert.@jonathan1055: Glad I’m not the only one! That repository could really use some better documentation.
Comment #5
jonathan1055 commentedYes JS is one of the mysteries I understand the least about :-)
If found https://github.com/wikimedia/eslint-plugin-no-jquery/blob/master/docs/ru... which I think is explaining the rule.
I presume you have javascript test coverage for the behaviours function you are changing? Would it be worth making an incorrect change, eg swapping over the 'enabled' and 'disabled' text, to prove it?
Comment #6
drunken monkeyNo, I don’t think these are covered by our
FunctionalJavascripttests. I just tried it out manually and it works fine.Thanks for finding the docs! However, the “correct code” examples they give do not work for me, and also aren’t consistent with the error message that says
matches()should be used instead. So, they don’t seem very helpful.Anyways, I think we can just merge this, should be fine.