qBittorrent
qBittorrent copied to clipboard
WebUI: migrate ESLint rules
https://eslint.style/guide/migration
@Chocobo1 A few questions, if you don't mind.
What about using es2023
here? (I'm not sure if latest
can be used via env
like parse options etc. i.e. ecmaversion : latest)
https://github.com/qbittorrent/qBittorrent/blob/d3315f7cc7f31b1578cf72f07b175a80c204dac9/src/webui/www/.eslintrc.json#L4
I noticed the qBittorrent-website
repo uses ecmaVersion: 2021
, could this be migrated to ecmaversion : latest
?
https://github.com/qbittorrent/qBittorrent-website/blob/master/eslint.config.mjs#L17
Can v8
be unpinned now or do we still need v9
to mature a bit?
https://github.com/qbittorrent/qBittorrent/blob/d3315f7cc7f31b1578cf72f07b175a80c204dac9/src/webui/www/package.json#L14-L15
What about using es2023 here? (I'm not sure if latest can be used via env like parse options etc. i.e. ecmaversion : latest)
Our webui targets browsers released from a year ago so es2023
is too new.
I noticed the qBittorrent-website repo uses ecmaVersion: 2021, could this be migrated to ecmaversion : latest?
Specifying the latest spec would require website visitors use a very up-to-date browser and would (possibly) block non-trivial portion of viewers, I wouldn't recommend that. Also note that this option has nothing to do with the produced code. It is only for CI checking and some sort of declaration about the official supported version.
Can v8 be unpinned now or do we still need v9 to mature a bit?
It seems v9.x is stable now. I plan to migrate over but the config file would also need migrated. If someone helps approving this PR and #20728 perhaps it could be realized faster.
Our webui targets browsers released from a year ago so
es2023
is too new.
👍
It is only for CI checking and some sort of declaration about the official supported version.
Ahh...I thought it was only just related to the CI.
I think it would be ok though to bump pinned dependency of @11ty/eleventy
to 2.0.1
as it's latest/bugfix release
https://github.com/qbittorrent/qBittorrent-website/blob/1ebeec692c1f932e4636416332dfbf84c1f68902/package.json#L15-L16
I think it would be ok though to bump pinned dependency of @11ty/eleventy to 2.0.1 as it's latest/bugfix release https://github.com/qbittorrent/qBittorrent-website/blob/1ebeec692c1f932e4636416332dfbf84c1f68902/package.json#L15-L16
You can use this calculator to check which version will be picked: https://semver.npmjs.com/
Put @11ty/eleventy
as the package name and put ^2.0.0
as the version. It will pick the latest version available which will be 2.0.1
Also check out the Use the caret (aka hat) symbol, ^
paragraph below.
IMO it would be better if it was specified 2.x
(or 2
, equivalent but shorter). It seems ^2.0.0
is equivalent to 2
so I wasn't in a hurry to change it. You can submit a PR if you want or I'll do it later.
@Chocobo1 Thanks for the explanation & link, the change is trivial - so will leave it to you if you want to change it or not, there's a v3
in development....(alpha)
PR updated, resolved merge conflicts.