microsoft / microsoft/TypeScript-Website

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

Open Beginner friendly
#3,607 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.6k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
7

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the noUncheckedSideEffectImports section and the linked TypeScript 6.0 release notes page, then review the listed TS2882 and CSS package cases. Done means both affected pages explain how CSS library authors can help users avoid TS2882 when users globally import CSS entrypoints.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.