eslint-plugin-lwc icon indicating copy to clipboard operation
eslint-plugin-lwc copied to clipboard

Improve TypeScript support by allowing types to be imported

Open wjhsf opened this issue 1 year ago • 0 comments
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:

  1. Keep the current implementation, but add commonly used type and interface declarations.
  2. Allow any type or interface to be imported.
  3. Skip checking import type declarations (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.)

wjhsf avatar Sep 25 '24 20:09 wjhsf