Skip to content

Investigate es-lint upgrade#3778

Open
OyvindLGjesdal wants to merge 2 commits intoapache:mainfrom
OyvindLGjesdal:investitage-es-lint-upgrade2
Open

Investigate es-lint upgrade#3778
OyvindLGjesdal wants to merge 2 commits intoapache:mainfrom
OyvindLGjesdal:investitage-es-lint-upgrade2

Conversation

@OyvindLGjesdal
Copy link
Contributor

@OyvindLGjesdal OyvindLGjesdal commented Mar 2, 2026

GitHub issue resolved #

Pull request Description:

Dependabot fails build for eslint. Investigating why.

If eslint also has an updated version and updated lockfile, the CI runs successfully (https://github.com/OyvindLGjesdal/jena/actions/runs/22578692265)

However there are some other issues/warnings, that should probably be updated with the new version.

lockfile updated with

yarn upgrade eslint@10.0.1
warning " > @vue/eslint-config-standard@8.0.1" has incorrect peer dependency "eslint@^8.0.1".
warning "@vue/eslint-config-standard > eslint-config-standard@17.1.0" has incorrect peer dependency "eslint@^8.0.1".
warning " > eslint-plugin-import@2.32.0" has incorrect peer dependency "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9".
warning "@vue/eslint-config-standard > eslint-plugin-promise@6.6.0" has incorrect peer dependency "eslint@^7.0.0 || ^8.0.0 || ^9.0.0".
warning " > eslint-plugin-promise@7.2.1" has incorrect peer dependency "eslint@^7.0.0 || ^8.0.0 || ^9.0.0".
warning " > eslint-plugin-vue@9.33.0" has incorrect peer dependency "eslint@^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0".

eslint-plugin-standard no longer in use: https://www.npmjs.com/package/eslint-plugin-standard (can probably just remove)

Will try to update also rest of dependencies.


  • Tests are included.
  • Documentation change and updates are provided for the Apache Jena website
  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

@OyvindLGjesdal OyvindLGjesdal marked this pull request as draft March 2, 2026 14:16
@afs
Copy link
Member

afs commented Mar 2, 2026

Thank you!

@OyvindLGjesdal
Copy link
Contributor Author

OyvindLGjesdal commented Mar 2, 2026

Three depencies are not updated for 10 yet and gives warnings:

eslint-config-standard@9.0.1" has incorrect peer dependency "eslint@^9.10.0".
warning "@vue/eslint-config-standard > eslint-plugin-import-x@4.16.1" has incorrect peer dependency "eslint@^8.57.0 || ^9.0.0".
warning " > eslint-plugin-promise@7.2.1" has incorrect peer dependency "eslint@^7.0.0 || ^8.0.0 || ^9.0.0".
warning " > eslint-plugin-import

After update there are also some new lint errors:

$ eslint --fix src

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/components/ServerStatus.vue
  66:21  error  'setInterval' is not defined    no-undef
  72:5   error  'clearInterval' is not defined  no-undef

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/components/Toast.vue
  120:7  error  'setTimeout' is not defined  no-undef

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/plugins/services.js
  26:67  error  'window' is not defined  no-undef

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/services/fuseki.service.js
  147:13  error  There is no `cause` attached to the symptom error being thrown  preserve-caught-error
  149:11  error  There is no `cause` attached to the symptom error being thrown  preserve-caught-error

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/services/mock/json-server.js
  290:7  error  'console' is not defined  no-undef
  299:3  error  'console' is not defined  no-undef

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/utils/query.js
  43:5  error  'document' is not defined  no-undef
  45:5  error  'document' is not defined  no-undef
  46:5  error  'document' is not defined  no-undef
  47:5  error  'document' is not defined  no-undef

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/utils/validation.js
  42:9  error  'URL' is not defined  no-undef

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/views/dataset/Edit.vue
  245:9  error  'alert' is not defined  no-undef

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/views/dataset/Query.vue
  274:7   error  'setTimeout' is not defined  no-undef
  277:9   error  'document' is not defined    no-undef
  278:9   error  'document' is not defined    no-undef
  282:11  error  'document' is not defined    no-undef
  299:11  error  'document' is not defined    no-undef

/Users/oyvindlgjesdal/repos/apache/jena/jena-fuseki2/jena-fuseki-ui/src/views/manage/Tasks.vue
  117:20  error  'setInterval' is not defined    no-undef
  130:7   error  'clearInterval' is not defined  no-undef

Since jena has implemented/moved into the flat config file described in https://eslint.org/docs/latest/use/configure/migration-guide I think the old style rc files are not read. Therefore I think these are currently not used/picked up (also in main):

./tests/.eslintrc.js
./tests/e2e/.eslintrc.js

and have to be migrated to the flat format (eslint.config.js in jena-fuseki-ui).

However the ci job that runs lint also just uses eslint --fix src so I think that means the linting for tests has been done on the developer machine.

@OyvindLGjesdal OyvindLGjesdal force-pushed the investitage-es-lint-upgrade2 branch from 7408766 to 9995f5e Compare March 2, 2026 20:52
…encies

* update eslint-config-standard to 8.0.1 -> 9.0.1 (not updated for 10 yet)
* use caret for eslint 10 to update package lock later
* delete eslint-plugin-standard (removed, part of other dependencies afaik)
* update plugin-vue 9.17.0 -> 10.8.0
* add unmet peer dependency for typescript (from eslint-config-standard 9)
* add unmet peer dependency for vue-eslint-parser (from upgraded eslint-plugin-vue)
* Add globals (browser) dependency to eslint-config for defined browser objects
* Update ecma version (maybe uneccessary, suggested by LLM from warnings in IDE, didnt solve)
* Rethrow cause for lint error (preserve-caught-error)
@OyvindLGjesdal OyvindLGjesdal force-pushed the investitage-es-lint-upgrade2 branch from 4063592 to f688820 Compare March 2, 2026 21:01
@OyvindLGjesdal OyvindLGjesdal marked this pull request as ready for review March 2, 2026 21:06
@OyvindLGjesdal
Copy link
Contributor Author

OyvindLGjesdal commented Mar 2, 2026

This should be ready for review. Would you have the time to check if the javascript specific changes looks ok @kinow?

I'm not that confident in the Jena-UI and node parts of the application, since I don't do much similar things elsewhere. Fixed the new eslint errors by adding browser to globals, and adding the cause back to the Error(msg,cause).

Some things could have a followup (or removing dependencies?) if my assumptions are correct that some eslint config files aren't read.

@afs afs changed the title Investitage es-lint upgrade Investigate es-lint upgrade Mar 4, 2026
@afs
Copy link
Member

afs commented Mar 4, 2026

I pulled the PR, didn't rebase to latest main (see conflict), did a build and ran the server.

From an incognito window, I uploaded data (first attempt - got an error wanting a graph name of blank when it was blank - IIRC this is not new; second time upload worked), and did a query.

It worked 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants