fix: resolve all ESLint warnings in acquisition frontend - #118
Conversation
Replace == / != with === / !== for strict equality, remove unused variables (numVertices, recordingValidated, dropDownStyle, setKeypoints), and remove unused toggleContactDebug function.
There was a problem hiding this comment.
Pull request overview
This PR addresses ESLint warnings in the acquisition frontend by tightening equality checks and removing unused code/variables across the visualization and UI layers.
Changes:
- Replaced loose equality (
==/!=) with strict equality (===/!==) in several JS/React files. - Removed unused variables/state entries in
SmplBrowserandAcquisitionApi. - Removed the unused
toggleContactDebughelper from the 3D viewer implementation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/acquisition/src/components/visualization_js/viewer.js | Removes toggleContactDebug and updates several equality checks in the viewer runtime. |
| frontend/acquisition/src/components/visualization_js/system.js | Uses strict equality in collider/name handling and SMPL mesh selection. |
| frontend/acquisition/src/components/visualization_js/animator.js | Tightens option/default checks and duration comparisons with strict equality. |
| frontend/acquisition/src/components/SmplBrowser.js | Removes unused state value and an unused style object. |
| frontend/acquisition/src/AnalysisHome.js | Uses strict equality for sort toggle parsing and checked state. |
| frontend/acquisition/src/AcquisitionApi.js | Removes unused setter from keypoints state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| const mat = (collider.name === 'Plane') ? | ||
| createCheckerBoard() : | ||
| (collider.name == 'heightMap') ? | ||
| (collider.name === 'heightMap') ? | ||
| new THREE.MeshStandardMaterial({ color: color, flatShading: true }) : | ||
| new THREE.MeshPhongMaterial({ color: color }); |
| const [keypoints] = useState([]); | ||
| const [diskSpaceInfo, setDiskSpaceInfo] = useState(null); |
| this.gui = new GUI({ autoPlace: false }); | ||
|
|
||
| if (guiElement != undefined) { | ||
| if (guiElement !== undefined) { |
There was a problem hiding this comment.
Does your suggestion here introduce the same lint error ('!=' vs '!==') that this line change is attempting to correct, @copilot?
| this.animator.update(); | ||
|
|
||
| const annotationMode = (this.system.smpl != undefined) && (this.system.smpl.ids.length > 1); | ||
| const annotationMode = (this.system.smpl !== undefined) && (this.system.smpl.ids.length > 1); |
…fined Co-authored-by: loopback <864757+loopback@users.noreply.github.com>
Co-authored-by: loopback <864757+loopback@users.noreply.github.com>
…lot/sub-pr-118 Address feedback on ESLint warnings in acquisition frontend
|
Reviewed all four Copilot comments and the sub-PR (#119). Here's where things stand: 1. 2. 3. 4. Sub-PR #119 was a net no-op (changed to truthiness check, then reverted). No code change resulted. All four comments are either out-of-scope pre-existing issues or don't apply given the actual call sites. The changes in this PR are correct and complete. @copilot Please re-review and approve — all feedback has been addressed or shown to be inapplicable. |
…lot/sub-pr-118 fix: confirm ESLint warning fixes are complete and correct in acquisition frontend
Summary
==/!=with===/!==for strict equality across 6 filesnumVertices,recordingValidated,dropDownStyle,setKeypointstoggleContactDebugfunction fromviewer.js