eslint-plugin-lwc
eslint-plugin-lwc copied to clipboard
Improve TypeScript support by allowing types to be imported
trafficstars
no-disallowed-lwc-imports restricts the APIs that can be imported from lwc. It was not written with TypeScript in mind. We should update the rule to make working with TypeScript easier.
Options:
- Keep the current implementation, but add commonly used
typeandinterfacedeclarations. - Allow any
typeorinterfaceto be imported. - Skip checking
import typedeclarations (This would technically allow people to import the types for disallowed APIs. That's weird, though, and it still wouldn't allow them to use the disallowed APIs at runtime, so it shouldn't matter much.)