- Issue created by @nod_
As mentioned in the parent issue #3238306: [META] Where possible, refactor existing jQuery uses to vanillaJS to reduce jQuery footprint → , we are working towards reducing our jQuery footprint. One of the ways to accomplish this is to reduce the number of jQuery features used in Drupal core. We have added eslint rules that identify specific features and fail tests when those features are in use.
There are (or will be) individual issues for each jQuery-use eslint rule. This one is specific to jquery/no-parents
, which targets the jQuery parents function.
core/.eslintrc.jquery.json
Change "jquery/no-parents": 0,
to "jquery/no-parents": 2,
to enable eslint checks for uses of jQuery parent()
. With this change, you'll be able to see uses of the undesirable jQuery feature by running yarn lint:core-js-passing
from the core
directoryparents()
to use Vanilla (native) JavaScript instead.Active
11.0 🔥