chore: align tooling with react-native-typescript-library-starter - #17
Merged
Conversation
Moves sources to src/ with an index barrel, builds dual CJS/ESM + type definitions via react-native-builder-bob into lib/, and publishes only src + lib through the files field (replacing .npmignore and the custom build scripts). Modernizes husky hooks to the v9 format (drops the boilerplate that v10 will reject), wires lint-staged into pre-commit, adopts the starter's eslint/prettier/tsconfig/babel configs, and adds a jest + testing-library suite with a CI workflow running typecheck, lint, tests with coverage, and build.
kuraydev
force-pushed
the
chore/align-with-library-starter
branch
from
August 12, 2026 14:18
af77557 to
6cea687
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the library in line with react-native-typescript-library-starter and fixes the husky v10 deprecation warnings.
Structure & build
lib/tosrc/with anindex.tsbarrel (default export preserved —import SegmentedControl from "react-native-segmented-control-2"keeps working;SegmentedControl,SegmentedControlProps, andTabItemare now also named exports).lib/, with propermain/module/types/exportsfields.files: ["src", "lib"]replaces.npmignore— the npm tarball now ships only sources and build output (26 files, no more.idea/.husky/scripts junk).Tooling
husky.shboilerplate that v10 will reject.pre-commitnow runs lint-staged (eslint --fix + prettier on staged files);commit-msgkeeps commitlint.tabStylefunctions, andinsetShadow. Coverage: 100% statements/lines/functions, 91% branches (thresholds 80/80/80/70).Verified
npm run typecheck✅npm run lint:ci✅npm run prettier:ci✅npm run test:coverage✅ (9/9)npm run build✅npm pack --dry-runproduces a clean tarball; the example app consumes the package from npm and is unaffected.Note: version stays 2.2.0 since it was never published — this restructure can ship as part of that release.