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
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 inpackage.json
- Their names don't end with
Library users bump into TS2882 at import "library-name/css".
- https://github.com/payloadcms/payload/issues/16346
- https://github.com/tauri-apps/meilisearch-docsearch/issues/219
- https://github.com/vuetifyjs/vuetify/issues/22766
- https://github.com/arnog/mathlive/issues/3030
- https://github.com/search?q=noUncheckedSideEffectImports+TS2882+import&type=issues
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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