Bug 39188 - ESLint doesn't work due bug in old "globals" node package
Summary: ESLint doesn't work due bug in old "globals" node package
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Victor Grousset/tuxayo
QA Contact: Matt Blenkinsop
URL:
Keywords:
Depends on: 38664
Blocks:
  Show dependency treegraph
 
Reported: 2025-02-24 04:41 UTC by Victor Grousset/tuxayo
Modified: 2025-04-11 07:55 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39188: Fix ESLint by Updating "globals" node package (1.33 KB, patch)
2025-02-24 04:50 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 39188: [DO NOT PUSH] yarn.lock [DON'T APPLY IF IT CONFLICTS] (1.07 KB, patch)
2025-02-24 04:50 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 39188: Fix ESLint by Updating "globals" node package (1.38 KB, patch)
2025-03-14 07:45 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 39188: [DO NOT PUSH] yarn.lock [DON'T APPLY IF IT CONFLICTS] (1.12 KB, patch)
2025-03-14 07:45 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 39188: Fix ESLint by Updating "globals" node package (1.45 KB, patch)
2025-04-03 08:11 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 39188: [DO NOT PUSH] yarn.lock [DON'T APPLY IF IT CONFLICTS] (1.19 KB, patch)
2025-04-03 08:11 UTC, Matt Blenkinsop
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Grousset/tuxayo 2025-02-24 04:41:07 UTC
1. eslint ./koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue
2. TypeError: Key "languageOptions": Key "globals": Global "AudioWorkletGlobalScope " has leading or trailing whitespace

globals was introduced in these commits:
Bug 38664: Add @babel/core back to package.json
Bug 38664: Update yarn.lock

And somehow it pulls the version from Apr 2019. Which had a trailing space in a value.
Comment 1 Victor Grousset/tuxayo 2025-02-24 04:50:56 UTC Comment hidden (obsolete)
Comment 2 Victor Grousset/tuxayo 2025-02-24 04:50:58 UTC Comment hidden (obsolete)
Comment 3 Magnus Enger 2025-03-14 07:45:46 UTC
Created attachment 179302 [details] [review]
Bug 39188: Fix ESLint by Updating "globals" node package

According to the main dev of ESLint, we should add it to devDependencies
because we are the ones calling globals from eslint.config.mjs:
https://github.com/eslint/eslint/issues/19209#issuecomment-2518452107

Test plan:
1. run: eslint ./koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue
2. TypeError: Key "languageOptions": Key "globals": Global "AudioWorkletGlobalScope " has leading or trailing whitespace
3. :(
4. Apply patch
5. sudo yarn install --modules-folder /kohadevbox/node_modules
6. run: eslint ./koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue
7. eslint output a report about the issues found in the file
8. signoff :D

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 4 Magnus Enger 2025-03-14 07:45:49 UTC
Created attachment 179303 [details] [review]
Bug 39188: [DO NOT PUSH] yarn.lock [DON'T APPLY IF IT CONFLICTS]

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 5 Matt Blenkinsop 2025-04-03 08:11:47 UTC
Created attachment 180436 [details] [review]
Bug 39188: Fix ESLint by Updating "globals" node package

According to the main dev of ESLint, we should add it to devDependencies
because we are the ones calling globals from eslint.config.mjs:
https://github.com/eslint/eslint/issues/19209#issuecomment-2518452107

Test plan:
1. run: eslint ./koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue
2. TypeError: Key "languageOptions": Key "globals": Global "AudioWorkletGlobalScope " has leading or trailing whitespace
3. :(
4. Apply patch
5. sudo yarn install --modules-folder /kohadevbox/node_modules
6. run: eslint ./koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue
7. eslint output a report about the issues found in the file
8. signoff :D

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 6 Matt Blenkinsop 2025-04-03 08:11:50 UTC
Created attachment 180437 [details] [review]
Bug 39188: [DO NOT PUSH] yarn.lock [DON'T APPLY IF IT CONFLICTS]

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 7 Katrin Fischer 2025-04-11 07:55:54 UTC
Pushed for 25.05!

Well done everyone, thank you!