Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tech: run automated refactoring #834

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rangoo94
Copy link
Member

@rangoo94 rangoo94 commented Aug 17, 2023

As per Slack discussion, I run automated refactoring. Please take a look if the structure suits you well - if not, we may just change the script to set it up different. Don't worry about future conflicts - the script is able to run fast and multiple times.

Changes

  • Clean import paths
  • Replace wildcard import/export
  • Avoid pass-through imports
  • Avoid using global React.* values
  • Fix type imports
  • Replace default with named exports
  • Unwrap directories
  • Delete empty files
  • Delete empty directories
  • Join same imports
  • Change TSX extension to TS, when JSX syntax is not used

Fixes

Logs

$ node index
✔ refactorings · Clean import paths, Replace wildcard import/export, Avoid pass-through imports, Avoid using global React.* values, Fix type imports, Replace default with named exports, Unwrap directories, Delete empty files, Delete empty directories, Join same imports, Change TSX extension to TS without React, Run Prettier
Clean import paths
==================
Changed 57/600 files.
Done!
Replace wildcard import/export
==============================
Changed 1/600 files.
Done!
Avoid pass-through imports
==========================
Changed 338/600 files.
Done!
Avoid using global React.* values
=================================
Changed 170/600 files.
Done!
Fix type imports
================
Changed 111/600 files.
Done!
Replace default with named exports
==================================
Changed 324/600 files.
Done!
Unwrap directories
==================
Changed 297/600 files.
Done!
Delete empty files
==================
Deleted 145/600 empty files.
Done!
Delete empty directories
========================
Deleted 65 empty directories.
Done!
Join same imports
=================
Changed 1/455 files.
Done!
Change TSX extension to TS without React
========================================
Changed 77/455 files.
Done!
Run Prettier
============
Changed 271/455 files.
Done!

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

@vercel
Copy link

vercel bot commented Aug 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
testkube-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 24, 2023 8:12am

- Clean import paths
- Replace wildcard import/export
- Avoid pass-through imports
- Avoid using global React.* values
- Fix type imports
- Replace default with named exports
- Unwrap directories
- Delete empty files
- Delete empty directories
- Join same imports
- Change TSX extension to TS without React
- Run Prettier
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.

3 participants