Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
Today I updated to the newly scoped package as opposed to the old unscoped/non-monorepo one, and I also inherited the recommended config.
First thing I noticed by enabling all your recommended rules is that you have some redundant ones:
@typescript-eslint/explicit-function-return-type
@typescript-eslint/no-unused-vars
Why do these rules exist? There are already compiler options for them:
noImplicitReturns
noUnusedLocals
noUnusedParameters
In fact, the rules do a much worse job and seem to be very flaky. Why would we recommend these instead of built-in compiler features?
For example, the unused-vars rule doesn't detect the usage of types in interface generics:
interfaceFooextendsSomeType<AnotherType>{
SomeType
is marked as unused.
Another example, the return type rule has no clue about inheritance. It will error if you don't specify the return type of a method even if the method it overrides has a return type on it. TypeScript allows this.
Are these rules just here for legacy reasons or is there a reason to prefer them?
I would ask you at least remove them from the recommended config and start recommending the much more stable, much stronger compiler features.