avoid-implicitly-nullable-extension-types
preset: recommended
Warns when an extension type declaration does not have the implements
clause.
Not adding the implements
clause (when applicable) implicitly makes the extension type nullable even when the representation type is not.
Example
❌ Bad:
// LINT: Avoid implicitly nullable extension types. Try making it implement the representation type.
extension type ET1(String s) {}
extension type ET3(String? s) {}
✅ Good:
extension type ET1(String s) implements String {} // Correct, implements String
extension type ET3(String? s) {}