Repository navigation
feat(lang-ts): calibrate and display React JSX/TSX Reference ranges (ADR 0020) - #385
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Calibrate pre-2023 React (
.jsx/.tsx) Reference ranges across 20 public repositories (10 TypeScript + 10 JavaScript) indocs/adr/0020-react-reference-ranges.md, addreact_reference_rangesinplugins/languages/ts/src/sfc.rsandcrates/cli/src/check.rs(including--packagemanifest scoping that prefers member manifests over root), and add theReact (.jsx / .tsx)row to theCalibrated Reference rangestables inREADME.mdanddocs/guide/languages.md.Tier
Tier 3
Task
Owner asked to test 20 React (JSX and TSX) repositories and add calibrated React Reference ranges to the
Calibrated Reference rangestable alongside TypeScript/JavaScript and Vue 2 / Vue 3.Fail-first test
plugins/languages/ts/tests/sfc.rs:react_reference_ranges_detects_react_manifests_and_skips_node_modulesandvue_reference_ranges_detects_vue_2_and_vue_3_from_package_json(node_modulesexclusion).crates/cli/src/check/tests.rs:react_reference_ranges_select_adr_0020_and_preserve_vue_and_hybrid_precedenceandpackage_scoped_reference_ranges_prefer_member_manifests_over_root.Checks
cargo fmt --all --check: PASScargo clippy -p codeint-lang-ts -p codeint-cli --all-targets --locked -- -D warnings: PASScargo test --locked -p codeint-lang-ts: PASS (100 conformance + 7 entry_points + 3 rules + 6 sfc)cargo test --locked -p codeint-cli --lib check::tests::: PASS (23 passed, 0 failed)cargo test --locked -p codeint-cli --test check: PASS (156 passed, 0 failed)cargo run --locked -p xtask -- no-duplicate-code --base 9c02ad6: PASScargo run --locked -p xtask -- merged-result: PASScargo run --locked -p codeint-cli -- diff 9c02ad6: PASS (0 regressions)25ba9c5: PASS (0 verified findings; Rounds 1 and 2 findings fixed and re-verified)Safety proof
react_reference_rangesactivates only whentypescript-javascriptmeasures.jsxor.tsxfiles, no.vuefiles are measured, and an active (non-node_modules)package.jsondeclaresreact. Under--package,scoped_manifests_for_packageevaluates member manifests first and falls back to rootpackage.jsononly when member manifests declare neither Vue nor React. Vue repositories using Vue JSX continue displaying Vue 2/3 Reference ranges, hybrid Vue + React repositories fall back cleanly to general TS/JS Reference ranges (ADR 0008), and plain.ts/.jsrepositories stay on ADR 0008. Only repository names, pinned pre-2023 commit SHAs, file counts, and Metric ratios appear in ADR 0020.Runtime evidence
Measured 20 pre-2023 React repositories (6,883
.tsxfiles, 256.jsxfiles, 1,858,963 Production lines) withcodeint 0.6.0(df9ffed), producing 10th to 90th percentile ranges: Erosion10.6% to 54.4%, Duplication4.6% to 36.8%, Verbosity4.7% to 36.8%, Import cycles0.0% to 14.4%.Gaps
None.