Shoko-WebUI icon indicating copy to clipboard operation
Shoko-WebUI copied to clipboard

Possible eslint rules to consider adding (living document)

Open harshithmohan opened this issue 1 year ago • 7 comments

harshithmohan avatar Aug 14 '23 16:08 harshithmohan

For no-explicit-any rtkq lazy queries need to be typed better somehow I didn't spend time to figure it out so I put any in there.

hidden4003 avatar Aug 20 '23 11:08 hidden4003

Which one do we want for @typescript-eslint/array-type ?

hidden4003 avatar Sep 21 '23 10:09 hidden4003

I would prefer T[] since that is consistent across languages.

harshithmohan avatar Sep 21 '23 12:09 harshithmohan

How well does it work with complex types? Or should we then convert all rtkq request/response types into actual type declarations instead of being inline?

hidden4003 avatar Sep 21 '23 13:09 hidden4003

image

Things like this seem to still work

harshithmohan avatar Sep 21 '23 15:09 harshithmohan

wait... This is not supposed to be closed. That's why it says "living document". We can add more rules to this same issue if required

harshithmohan avatar Sep 22 '23 08:09 harshithmohan

@hidden4003 Check if we should extend this also. For more consistency

plugin:@typescript-eslint/stylistic-type-checked -> More "styling" rules. eg., Prefer Record over [key: T]: T, prefer ?? over ||, etc. Also includes @typescript-eslint/array-type which we have added before

harshithmohan avatar Jan 01 '24 17:01 harshithmohan