I'm working through a project that involves fixing a lot of linting issues (if possible). One that is PLAGUING me is "Parameter should be a read only type @livid void-eslint/prefer-readonly-parameter-types".
As an example, this is some code for a zustand store (it might be janky, it works what I'm doing I'm really only focused on why this linter issue is happening). And for reference that exact linting error is thrown on lines 11, 15, and 23 (createList and updateList in the interface definition, and when createList is defined on line 23).
The code is attached. If anyone can offer any insight into how to fix the linting issue or why it's happening I would love to know. I would think that in most cases simply using Readonly<> would be enough to alleviate this problem (and functionally leads to cleaner code too?)
Is it in relation to Zustar forcing some kind of mutation of a readonly assignment? Is there any good fix?