-
Notifications
You must be signed in to change notification settings - Fork 2.6k
refactor: migrate from CRA to Vite and improve testing #636
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
Conversation
Replace Create React App with Vite build system Add ESLint configuration and improve TypeScript types Create VSCode UI component mocks for better testing Update test files with proper async handling Add Tailwind CSS integration Fix accessibility by adding ARIA roles
|
|
@cte do you have any thoughts on this one? |
- Add recommended TypeScript ESLint rules and configurations - Configure explicit function return types and member accessibility - Add environment settings for Node.js and ES2021 - Update parser options and ignore patterns - Add --quiet flag to lint commands to reduce noise
Big +1 from me on the direction here. |
|
Wow this is big! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have strong opinions about which linter rules we want enabled, but in this branch there are 51 problems when you run npm run lint. We should probably add a lint job or step to https://github.com/RooVetGit/Roo-Code/blob/main/.github/workflows/code-qa.yml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can take care of it as a follow-up.
| "compile-tests": "tsc -p . --outDir out", | ||
| "install:all": "npm install && cd webview-ui && npm install", | ||
| "lint": "eslint src --ext ts && npm run lint --prefix webview-ui", | ||
| "lint": "eslint src --ext ts --quiet && npm run lint --prefix webview-ui", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seem to be a ton of warnings, so I can see why we'd add --quiet, but ideally we should treat everything as an error and fix or disable the current warnings (not urgent; I can take care of it as a follow-up).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seem to be a ton of warnings, so I can see why we'd add
--quiet, but ideally we should treat everything as an error and fix or disable the current warnings.
@cte i agree with you about this, but if i do that it will has a ton of change in this PR, this pr i want to just setting it up, and another PR to fix the eslint warning & error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure how these changes are related to the rest of the PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is eslint error & tsserver error when i change to vite
cte
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @samhvw8 - I can't wait to start improving the UX!
Replace Create React App with Vite build system
Add ESLint configuration and improve TypeScript types Create VSCode UI component mocks for better testing Update test files with proper async handling
Add Tailwind CSS integration
Fix accessibility by adding ARIA roles
Description
This Pr will make DX better, with faster build time and add support tailwind
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Migrated build system from CRA to Vite, integrated Tailwind CSS, improved testing and linting, and enhanced accessibility.
vite.config.mts.config-overrides.jsandbuild-react-no-split.js.package.jsonscripts to use Vite.index.cssandvite.config.mts.__mocks__directory.package.jsonfor better test environment..eslintrc.jsonwith TypeScript and React rules.HistoryView.tsxand other components.ClineProvider.tsto use new asset paths for styles and scripts.react-app-env.d.tsandreportWebVitals.ts.This description was created by
for 12dd546. It will automatically update as commits are pushed.