You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This introduces a narrow ESLint configuration focused on import hygiene in the OZTreeModule codebase. It adds just enough setup to surface unused imports/variables and duplicate imports without bringing in style or general code-quality rules.
Minimal ESLint config
Adds a root .eslintrc.js
Enables only:
no-unused-vars
no-duplicate-imports
Keeps no-unused-vars scoped to the intended signal by ignoring unused function args and caught errors
Project compatibility
Uses standard ESLint parser options for the existing Babel/Webpack ES module setup
Avoids extra plugins or opinionated presets
Ignores generated/vendor paths:
node_modules/**
OZprivate/rawJS/OZTreeModule/dist/**
static/**
npm / CI integration
Adds eslint to devDependencies
Adds a dedicated lint script targeting the maintained JS sources and tests:
CopilotAI
changed the title
[WIP] Configure ESLint to detect unused imports
Add minimal ESLint setup for unused imports and duplicate imports
Aug 1, 2026
@copilot
Please add a comment to this pull request for a report of the findings of running this new lint feature. Then summarize the findings in a clean reviewable set of lists that could be used by a human to look at each unused import in each file to verify results are correct and understand the scope of the needed changes. Explain why the changes to package-lock.json are so extensive. Are all those changes necessary for this new tooling?
@copilot
Please add a comment to this pull request for a report of the findings of running this new lint feature. Then summarize the findings in a clean reviewable set of lists that could be used by ...
Lint report from npm run lint scoped to OZprivate/rawJS/OZTreeModule/src and .../tests:
line 2: import config from '../../../global_config'; → 'config' is defined but never used.
line 4: import tree_state from '../../../tree_state'; → 'tree_state' is defined but never used.
line 6: import ArcShape from '../../shapes/arc_shape'; → 'ArcShape' is defined but never used.
line 7: import TextShape from '../../shapes/text_shape'; → 'TextShape' is defined but never used.
line 8: import ImageShape from '../../shapes/image_shape'; → 'ImageShape' is defined but never used.
line 9: import ArcTextShape from '../../shapes/arc_text_shape'; → 'ArcTextShape' is defined but never used.
line 10: import {ageAsText, gpmapper, is_primary_or_secondary_name} from '../../../factory/utils'; → 'ageAsText' is defined but never used.
line 10: import {ageAsText, gpmapper, is_primary_or_secondary_name} from '../../../factory/utils'; → 'gpmapper' is defined but never used.
line 10: import {ageAsText, gpmapper, is_primary_or_secondary_name} from '../../../factory/utils'; → 'is_primary_or_secondary_name' is defined but never used.
line 11: import {add_mr} from '../../move_restriction'; → 'add_mr' is defined but never used.
line 12: import {global_button_action} from '../../../button_manager'; → 'global_button_action' is defined but never used.
line 4: import tree_state from '../../../tree_state'; → 'tree_state' is defined but never used.
line 7: import TextShape from '../../shapes/text_shape'; → 'TextShape' is defined but never used.
line 8: import ImageShape from '../../shapes/image_shape'; → 'ImageShape' is defined but never used.
line 9: import ArcTextShape from '../../shapes/arc_text_shape'; → 'ArcTextShape' is defined but never used.
line 10: import {ageAsText, gpmapper, is_primary_or_secondary_name} from '../../../factory/utils'; → 'ageAsText' is defined but never used.
line 10: import {ageAsText, gpmapper, is_primary_or_secondary_name} from '../../../factory/utils'; → 'gpmapper' is defined but never used.
line 10: import {ageAsText, gpmapper, is_primary_or_secondary_name} from '../../../factory/utils'; → 'is_primary_or_secondary_name' is defined but never used.
line 11: import {add_mr} from '../../move_restriction'; → 'add_mr' is defined but never used.
line 12: import {global_button_action} from '../../../button_manager'; → 'global_button_action' is defined but never used.
line 1: import {pre_calc as _pre_calc, set_pre_calculator} from './pre_calc/pre_calc'; → 'set_pre_calculator' is defined but never used.
line 4: import {calc_horizon as _calc_horizon, update_parent_horizon as _update_parent_horizon, set_horizon_calculator} from './horizon_calc/horizon_calc'; → 'set_horizon_calculator' is defined but never used.
line 5: import data_repo from '../factory/data_repo'; → 'data_repo' is defined but never used.
The repo did not previously have ESLint in devDependencies, so adding it pulled in ESLint itself plus its transitive dependency tree.
The lockfile package count went from 1238 to 1305 entries (+67 packages).
package-lock.json is still lockfileVersion 2 before and after; this was not a lockfile format upgrade.
Git shows the diff as a binary replacement in this repo, but the file is plain JSON text. The large-looking change is mostly dependency additions needed to lock ESLint reproducibly.
For committed lockfiles, those dependency entries are expected and necessary if we want CI and other developers to install the exact same ESLint toolchain.
If we want a smaller review surface, the alternative would be to avoid committing lockfile changes, but that would make the ESLint tool version less reproducible across environments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces a narrow ESLint configuration focused on import hygiene in the OZTreeModule codebase. It adds just enough setup to surface unused imports/variables and duplicate imports without bringing in style or general code-quality rules.
Minimal ESLint config
.eslintrc.jsno-unused-varsno-duplicate-importsno-unused-varsscoped to the intended signal by ignoring unused function args and caught errorsProject compatibility
node_modules/**OZprivate/rawJS/OZTreeModule/dist/**static/**npm / CI integration
eslinttodevDependencieslintscript targeting the maintained JS sources and tests:OZprivate/rawJS/OZTreeModule/srcOZprivate/rawJS/OZTreeModule/testsExample of the configured rule surface: