-
Bug
-
Resolution: Fixed
-
Minor
-
4.1
-
MOODLE_401_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-76491-401 -
Take for instance the following line: https://github.com/moodle/moodle/blob/15d4ea81e003439c528004a8d555a07cad0f02d3/admin/tool/dataprivacy/amd/src/expand_contract.js#L83
The Notification module ('core/notification') has not been imported, so the code doesn't work (there are a few similar occurrences)
The eslint configuration ignores this, because it appears to confuse these undefined references with the browser Notification API
$ ./node_modules/.bin/grunt amd
|
Running "ignorefiles" task
|
|
Running "eslint:amd" (eslint) task
|
Browserslist: caniuse-lite is outdated. Please run:
|
npx browserslist@latest --update-db
|
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
|
|
/mnt/export/moodle/master/src/admin/tool/dataprivacy/amd/src/expand_contract.js
|
83:22 error Unexpected use of 'Notification' no-restricted-globals
|
|
/mnt/export/moodle/master/src/calendar/amd/src/event_form.js
|
62:24 error Unexpected use of 'Notification' no-restricted-globals
|
|
/mnt/export/moodle/master/src/lib/amd/src/modal_cancel.js
|
34:13 error Unexpected use of 'Notification' no-restricted-globals
|
|
/mnt/export/moodle/master/src/lib/amd/src/modal_save_cancel.js
|
36:13 error Unexpected use of 'Notification' no-restricted-globals
|
40:13 error Unexpected use of 'Notification' no-restricted-globals
|
60:9 error Unexpected use of 'Notification' no-restricted-globals
|
|
✖ 6 problems (6 errors, 0 warnings)
|
|
Warning: Task "eslint:amd" failed. Use --force to continue.
|
|
Aborted due to warnings.
|