Repository navigation
Conversation
It doesn't seem like linting is run anywhere anyway, not sure why it's been set up
Had to amend the ESLint->Oxlint commit, couldn't be bothered to fix the conflicts in the Prettier->Oxfmt commit
|
@previnder not to be merged yet, but wanted your eyes on this. I'll be working with noClaps to complete the rest of the items left to do, but this should help speed things up, along with bumping the UI deps, which should also introduce some performance improvements during the build. |
Simple fix highlighted by e18e CLI This version of history was already being used by other deps, so it makes sense to switch to it instead of having two separate versions
redux-devtools-extension is deprecated with @redux-devtools/extension as the official replacement https://npmx.dev/package/redux-devtools-extension https://npmx.dev/package/@redux-devtools/extension
|
I ran this on my side, and the performance improvement is pretty good. One thing I noticed is that Let's keep the config file in YAML. YAML files are easier to edit by hand than JSON, and the additional dependency is not a major concern. Discuit uses plain Redux right now, not Redux Toolkit, so I'm not sure if replacing the Redux packages with Redux Toolkit packages would even work. A full migration from Redux to Redux Toolkit, however, would be a massive change. |
Yeah that's just how
Okay sure, removed the todo-list item.
I'm not sure about this, because RTK re-exports everything from Redux, so it's a drop-in replacement in that sense. The larger migration is mainly modernising the code and removing some deprecated features like Edit: I tried doing the migration and it ended up being around +700-something -1100-something lines which is small, but not as drop-in as I'd have liked. I can make the change if you'd like, otherwise I can leave it for the future. Edit 2: Found another way to do the migration. This part middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({ immutableCheck: false, serializableCheck: false }),is there because otherwise there are a ton of errors in the console in dev mode. Nothing in prod either way. |
8488088 to
760c139
Compare
Had to add some config to set up Oxlint as the formatter, probably good to have for future contributors using Zed as well
Most of this was just exported symbols that didn't need to be exported, and leftover unused symbols. The d.ts file was renamed to global.d.ts, and some unused files were deleted.
react-router-dom exports all the needed symbols
This is preparation for the React Router v6 upgrade
|
I think if we are going to migrate to Redux Toolkit in full, it's better to do it in a separate PR so that we can merge this one without a lot of delay. |
|
Agreed. I talked to @Codycody31 and he said he'd be able to split up the PR as needed. If not, I can just make new PR myself. |
dbb3ec9 to
92622d9
Compare
React 19 hoists <head> elements by default so this dependency is no longer needed
This useEffect would fire since post.userGroup and post.publicId were both listed as dependencies of it, and it would cause the PUT request to fire. Ideally this should be a handler on the user group checkbox instead of a useEffect, but that's not a change for me to make.
|
This PR is ready for review from my end. I wasn't able to test the changes with a mod/admin account, but everything appears to work with a regular user account, at least based on my limited testing. P.S. There should probably be tests for the UI to ensure that things continue working. It would be a lot easier to run |
pnpm installorpnpm ci. I've set it to Node 26.13.0 for now since that's the latest version of Node, but this can be changed to LTS if needed.@vitejs/plugin-react, and TypeScript to their latest versions. This makes them much faster along with cutting down on a bunch of dependencies. A lot of the savings come from Vite v8 which uses the same Oxc parsers as Oxlint, Oxfmt and Knip.redux-devtools-extensionwith@redux-devtools/extension. The former is deprecated and the latter is the official replacement.react-markdown,react-helmet-asyncandreact-intersection-observerto their latest versions. I didn't test further than runningpnpm buildbut they didn't seem to have any impact.pnpx @e18e/cli analyze. Mostly just changing from manualconst var = []; for (...) { var.push(...); }style loops toArray.from,Array.map, etc., methods. The rest of the warnings are about dependency versions that we can't control.d.tstoglobal.d.ts.The main reason for these changes is to modernise the tooling in the UI code, and remove a bunch of unneeded and outdated dependencies. The UI itself is left intact.
I'd recommend going through this PR commit-by-commit rather than all at once as there are a lot of changes. It should also probably be split up into multiple PRs instead of one giant one.