Skip to content

CRITICAL: description on noUncheckedSideEffectImports has no guide for CSS npm library authors to have users avoid TS2882 when import css globally #3607

Description

@tats-u

Page URL: https://www.typescriptlang.org/tsconfig/#noUncheckedSideEffectImports https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html

Issue:

TS 6.0 turned on noUncheckedSideEffectImports by default but it causes errors on CSS libraries meeting the following conditions:

  • Has entrypoints meeting the following conditions:
    • Their names don't end with .css (e.g. library-name/css)
    • Globally imported (import "library-name/css")
    • Doesn't have "types" fields in their "exports" fields in package.json

Library users bump into TS2882 at import "library-name/css".

The offending pages must provide a guide for CSS library authors to deal with noUncheckedSideEffectImports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions