Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible eslint rules to consider adding (living document) #626

Open
4 tasks done
harshithmohan opened this issue Aug 14, 2023 · 7 comments
Open
4 tasks done

Possible eslint rules to consider adding (living document) #626

harshithmohan opened this issue Aug 14, 2023 · 7 comments

Comments

@harshithmohan
Copy link
Member

harshithmohan commented Aug 14, 2023

@hidden4003
Copy link
Member

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
Copy link
Member

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

@harshithmohan
Copy link
Member Author

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

@hidden4003
Copy link
Member

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?

@harshithmohan
Copy link
Member Author

image

Things like this seem to still work

hidden4003 added a commit that referenced this issue Sep 21, 2023
* Add @typescript-eslint/no-explicit-any (issue #626)

* Remove rule and extend the plugin

* Add @typescript-eslint/array-type
@harshithmohan
Copy link
Member Author

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 harshithmohan reopened this Sep 22, 2023
@harshithmohan
Copy link
Member Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants