New rules
@typescript-eslint/consistent-type-exports
@typescript-eslint/consistent-type-imports
@typescript-eslint/consistent-generic-constructors
@typescript-eslint/consistent-type-definitions
type
andinterface
are almost interchangeable. The main difference is thatinterface
can be extended from anywhere, which can be useful in a few cases, but can most often cause surprising hard to track down behavior. XO prefers being strict by default and have chosentype
. Just use aneslint-disable
comment in the few cases where you need the declaration to be extendable.- More info