microsoft / microsoft/fluentui-contrib
feat: normalize and enforce`@type` package dependencies
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 56
- Forks
- 62
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
Description
Follows https://github.com/microsoft/fluentui-contrib/pull/316
ATM we specify @types/* as peerDependencies. With the new behaviour added to package managers for auto installing peerDependencies, this approach adds unwanted behaviour for users not using TypeScript as part of their CI toolchain.
For that reason we should enforce following patterns when specifying dependencies:
If package has production dependency ( peer or prod ) which doesn't ship types as part of the package (eg react, react-dom ) a @types/* package needs to exists as peerDependency with additional peerDependenciesMeta definition that marks this type package as optional.
Implementation:
- add this functionality to
@nx/dependency-checkrule or - handle on our own via either
- custom lint rule
- nx sync generator
Related issues:
Contributor guide
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 by reviewing the proposed behavior in PR 316 and the @nx/dependency-check rule named in the implementation options; the issue does not identify repository files or tests. Done means enforcing the stated @types dependency and optional peerDependenciesMeta pattern for packages whose production dependencies do not ship types, while choosing and implementing one of the listed approaches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100