Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In #2946603: JS codestyle: no-use-before-define we added some // eslint-disable-next-line no-use-before-define
as resolving them was very hard. Let's see if we can.
Specifically in:
- modules/ckeditor/js/ckeditor.admin.es6.js
- modules/editor/js/editor.admin.es6.js
The output of yarn & yarn lint:core-js-passing
/Volumes/devdisk/dev/sites/drupal8alt.dev/core/modules/ckeditor/js/ckeditor.admin.es6.js
218:11 error 'dialog' was used before it was defined no-use-before-define
/Volumes/devdisk/dev/sites/drupal8alt.dev/core/modules/editor/js/editor.admin.es6.js
278:15 error 'findPropertyValuesOnTag' was used before it was defined no-use-before-define
331:15 error 'deleteFromUniverseIfAllowed' was used before it was defined no-use-before-define
✖ 3 problems (3 errors, 0 warnings)
Proposed resolution
Remove the // eslint-disable-next-line no-use-before-define
and fix it.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Comments
Comment #2
alexpottNote that we couldn't fix these by simply moving code because of the recursive nature of the methods. It might be acceptable to leave
// eslint-disable-next-line no-use-before-define
in and be done.Comment #12
quietone CreditAttribution: quietone at PreviousNext commentedAdding parent