This is a PR enabling eslint "rules-of-hooks".
This lint rule catches some very annoying bugs and enforces you to use correct naming for custom hooks (prepend with "use"), which is a mandatory react rule and important for a number of reasons.
I added eslint-disable statements wherever the rules are broken, and if this is merged, I would expect new code not to break the rules any longer.
I strongly suggest that the much better way to extract and reuse hooks and logic from components is the way the community does it and the React docs suggest. The new React docs are really fantastic in this regard and you can use the patterns found there very well to have an excellent application. https://react.dev/learn/reusing-logic-with-custom-hooks
* refactor: move CodeEditor to shared components and remove circular dependency
* feat: add code editor to problem editor
* fix: typo
* feat: add save function to raw olx editor and add highlighting
* feat: simplify and add tests to edit problem view
* feat: add tests to problem edit view
* fix: update raw editor tests
* fix: code editor tests
* fix: package-lock
* fix: lint