Skip to content

chore: cleanup unused packages and update setup#5012

Open
satya164 wants to merge 1 commit into
mainfrom
@satya164/cleanup
Open

chore: cleanup unused packages and update setup#5012
satya164 wants to merge 1 commit into
mainfrom
@satya164/cleanup

Conversation

@satya164

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 22, 2026 12:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR streamlines the repo’s tooling by removing unused packages, migrating several internal scripts from CommonJS/JS to ESM/TypeScript, and updating local + CI workflows to use the new setup (including switching git hooks from Husky to Lefthook).

Changes:

  • Remove unused dev dependencies and update yarn.lock accordingly; add Lefthook and newer Node typings.
  • Convert scripts to ESM/TypeScript (generate-mappings, typescript-output-lint, generate-ts-tests, component docs generator) and update call sites.
  • Update CI, docs, ESLint config/ignores, and tests to match the new scripts and reduceMotion usage.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
yarn.lock Dependency graph updated after package cleanup + new tooling deps (e.g., lefthook, @types/node).
src/core/tests/PaperProvider.test.tsx Updates provider setup to explicitly set reduceMotion defaults and adjusts reduce-motion mocking.
src/babel/tests/index.js Updates test helper to execute the new generate-mappings.ts script.
scripts/typescript-output-lint.ts Migrates script to ESM with node: imports and TS typing updates.
scripts/package.json Sets scripts/ folder module type to ESM.
scripts/generate-ts-tests.ts Replaces glob/rimraf-based JS script with a TS implementation using fs APIs.
scripts/generate-ts-tests.js Removes old CommonJS implementation.
scripts/generate-mappings.ts Replaces old CommonJS mapping generator with a typed ESM/TS version.
scripts/generate-mappings.js Removes old CommonJS implementation.
scripts/generate-component-docs.ts Migrates to ESM and hardens runtime type checks for required modules.
package.json Updates scripts (typecheck, generate-mappings), swaps Husky for Lefthook, and cleans devDependencies.
lefthook.yml Adds Lefthook hook definitions for commit-msg and pre-commit checks.
CONTRIBUTING.md Updates contributor instructions to reflect new script names (typecheck) and corrected wording.
.github/workflows/ci.yml Uses new script names, runs TS-based lint script, and adds example build job.
.github/pull_request_template.md Updates wording to reference typecheck instead of typescript.
.eslintrc Disables react-native/no-inline-styles for test files.
.eslintignore Ignores generated __ts-tests__/ and example/dist/.

Comment thread package.json Outdated
Comment on lines 56 to 59
"@babel/core": "^7.29.0",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/runtime": "^7.29.0",
"@babel/types": "^7.28.5",
"@callstack/eslint-config": "^13.0.2",
Comment thread CONTRIBUTING.md
Comment on lines 31 to +35
Our pre-commit hooks verify that your commit message matches this format when committing.

### Linting and tests

We use `typescript` for type checking, `eslint` with `prettier` for linting and formatting the code, and `jest` for testing. Our pre-commit hooks verify that the linter and tests pass when commiting. You can also run the following commands manually:
We use `typescript` for type checking, `eslint` with `prettier` for linting and formatting the code, and `jest` for testing. Our pre-commit hooks verify that type checking, linting, and tests pass when committing. You can also run the following commands manually:
Comment thread .eslintignore Outdated
Comment on lines +7 to +10
example/dist/
web-build/
jest/testSetup.js
__ts-tests__/
@satya164 satya164 force-pushed the @satya164/cleanup branch from 2679f67 to bc5b8ff Compare June 22, 2026 12:33
Copilot AI review requested due to automatic review settings June 22, 2026 13:06
@satya164 satya164 force-pushed the @satya164/cleanup branch from bc5b8ff to 1b3ca87 Compare June 22, 2026 13:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 26 changed files in this pull request and generated 2 comments.

Comment thread package.json Outdated
Comment on lines +38 to +39
"lint": "eslint ${@:-.}",
"typecheck": "tsc",
Comment thread eslint.config.mjs
Comment on lines +130 to +152
{
files: ['docs/**/*.{js,ts,tsx}'],
settings: {
'import/core-modules': [
'react-native-paper',
'@docusaurus/BrowserOnly',
'@docusaurus/Link',
'@docusaurus/plugin-content-docs/client',
'@site/component-docs-plugin/useDocs',
'@theme/Admonition',
'@theme/CodeBlock',
'@theme/TabItem',
'@theme/Tabs',
],
},
},
{
files: ['eslint.config.mjs'],
rules: {
'import/no-unresolved': 'off',
},
},
);
@satya164 satya164 force-pushed the @satya164/cleanup branch from 1b3ca87 to 4e521b3 Compare June 22, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants