-
Notifications
You must be signed in to change notification settings - Fork 41
Setup linting; update workflow for main branch rename #69
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
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.
Pull request overview
This PR sets up ESLint with TypeScript support and updates the codebase to comply with linting rules, while also updating GitHub workflows to reference the renamed main branch.
Key changes:
- Adds comprehensive ESLint configuration with TypeScript, React, and React Hooks plugins
- Fixes linting violations throughout the codebase (unused parameters, missing dependency arrays, JSX compliance)
- Migrates demo from React 17's
ReactDOM.renderto React 18'screateRootAPI - Updates GitHub workflows to use 'main' branch instead of 'master'
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| eslint.config.js | New ESLint flat config with TypeScript, React, and React Hooks rules configured |
| package.json | Adds lint script and ESLint-related dependencies; sets "type": "module" |
| package-lock.json | Updates lockfile with new ESLint dependencies |
| tests/index.spec.tsx | Removes unused parameter type annotations from test callbacks |
| src/index.tsx | Adds missing dependencies to useEffect arrays for exhaustive-deps rule compliance |
| demo/index.tsx | Migrates to React 18's createRoot API; adds JSX keys; escapes quotes for linting |
| rollup.config.demo.js | Adds react-dom/client global mapping for React 18 compatibility |
| .github/workflows/main.yml | Updates branch references from 'master' to 'main'; updates Actions versions |
| .github/workflows/pull-request.yml | Adds new PR workflow with build, lint, and test steps |
| README.md | Updates screenshot URLs to reference 'main' branch |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7b15203 to
6649978
Compare
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
6649978 to
3701605
Compare
localStorage parse errors - Add try-catch for JSON.parse when loading history from localStorage to prevent crashes on malformed data - Add missing terminalHistoryKey dependency to useEffect hooks to ensure history loads/saves correctly when terminal name changes - Fix WindowButtons red button using wrong callback for clickable class
- Replace DOM-based text measurement (span create/append/remove) with canvas.measureText() for better performance on cursor positioning - Fix inconsistent trim behavior: now saves trimmed input to history instead of comparing trimmed but storing untrimmed
- Add useCallback to React imports - Wrap updateCurrentLineInput handler in useCallback for memoization - Extract magic numbers as named constants: - SCROLL_INTO_VIEW_DELAY_MS (500) - CURSOR_POSITION_OFFSET_PX (1) - Move clamp utility function to module scope for reuse
941beb0 to
2d0a23d
Compare
No description provided.