Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ Read [docs/guide/philosophy-and-architecture.md](./docs/guide/philosophy-and-arc

## Calibrated Reference ranges

10th to 90th percentile across 20 pre-2023 open-source repositories per language ([ADR 0008](./docs/adr/0008-typescript-reference-ranges.md), [ADR 0010](./docs/adr/0010-rust-reference-ranges.md), [ADR 0011](./docs/adr/0011-php-reference-ranges.md), [ADR 0012](./docs/adr/0012-dart-reference-ranges.md), [ADR 0013](./docs/adr/0013-python-reference-ranges.md)):
10th to 90th percentile across 20 pre-2023 open-source repositories per language or Vue generation ([ADR 0008](./docs/adr/0008-typescript-reference-ranges.md), [ADR 0010](./docs/adr/0010-rust-reference-ranges.md), [ADR 0011](./docs/adr/0011-php-reference-ranges.md), [ADR 0012](./docs/adr/0012-dart-reference-ranges.md), [ADR 0013](./docs/adr/0013-python-reference-ranges.md), [ADR 0014](./docs/adr/0014-vue2-reference-ranges.md), [ADR 0015](./docs/adr/0015-vue3-reference-ranges.md)):

| Language | Erosion | Duplication | Verbosity | Import cycles |
| -------- | ------- | ----------- | --------- | ------------- |
| TypeScript / JavaScript | 35.2% to 60.0% | 1.7% to 34.6% | 1.8% to 34.7% | 0.0% to 30.8% |
| Vue 2 (`.vue`) | 2.0% to 45.2% | 3.6% to 19.2% | 3.6% to 19.2% | 0.0% to 11.4% |
| Vue 3 (`.vue`) | 1.9% to 38.8% | 2.3% to 34.5% | 2.4% to 34.6% | 0.0% to 7.7% |
| Rust | 38.0% to 64.2% | 5.0% to 32.5% | 6.0% to 32.9% | 2.1% to 50.6% |
| PHP | 5.5% to 67.7% | 4.1% to 29.0% | 4.2% to 29.2% | 0.0% to 10.7% |
| Dart | 4.7% to 41.9% | 7.3% to 25.6% | 8.0% to 25.9% | 7.3% to 52.4% |
Expand Down
32 changes: 25 additions & 7 deletions crates/cli/src/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use codeint_lang_dart::Dart;
use codeint_lang_php::Php;
use codeint_lang_python::Python;
use codeint_lang_rust::Rust;
use codeint_lang_ts::TypeScriptAndJavaScript;
use codeint_lang_ts::{TypeScriptAndJavaScript, vue_reference_ranges};
use codeint_model::{
CodeModel, InvalidReferenceRange, LanguagePlugin, LowerError, Manifest, MetricPlugin,
MetricPluginError, RepoPath, ResolveError, SkippedFile, SourceFile, Workspace, WorkspaceError,
choose_manifests, resolve_runtime_imports, settle_source_set,
MetricPluginError, ReferenceRanges, RepoPath, ResolveError, SkippedFile, SourceFile, Workspace,
WorkspaceError, choose_manifests, resolve_runtime_imports, settle_source_set,
};
use codeint_plugin_host::{
PluginHostError, WasmLanguagePlugin, WasmMetricPlugin, load_language_plugins_with_limits,
Expand Down Expand Up @@ -282,21 +282,39 @@ fn measure(
.zip(manifests_by_plugin)
.map(|((named, mut model), manifests)| {
let importers: Vec<&SourceFile> = model.files.iter().collect();
let reference_ranges = select_reference_ranges(named, &model, &manifests)?;
model.runtime_imports =
resolve_runtime_imports(named.plugin, tree.files(), manifests, &importers)
.map_err(CheckError::Resolve)?;
Ok(MeasuredLanguage {
plugin: named.name.to_owned(),
model,
reference_ranges: named
.plugin
.reference_ranges()
.map_err(CheckError::ReferenceRange)?,
reference_ranges,
})
})
.collect()
}

fn select_reference_ranges(
named: &NamedLanguagePlugin<'_>,
model: &CodeModel,
manifests: &[Manifest],
) -> Result<ReferenceRanges, CheckError> {
if named.name == "typescript-javascript"
&& model
.files
.iter()
.any(|f| f.path.as_str().ends_with(".vue"))
&& let Some(ranges) = vue_reference_ranges(manifests)
{
return ReferenceRanges::new(ranges).map_err(CheckError::ReferenceRange);
}
named
.plugin
.reference_ranges()
.map_err(CheckError::ReferenceRange)
}

fn assign_files_to_plugins<'tree>(
tree: &'tree Snapshot,
plugins: &[NamedLanguagePlugin<'_>],
Expand Down
99 changes: 99 additions & 0 deletions docs/adr/0014-vue2-reference-ranges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
status: accepted
---

# Vue 2 Reference ranges come from a panel of 20 public repositories

The Owner approved calibrating separate Vue 2 and Vue 3 Reference ranges on 2026-11-22 using the pre-2023 human-written selection rule established in [ADR 0008](./0008-typescript-reference-ranges.md).

## Context

Vue 2 Single-File Components (`.vue`) use the Options API and distinct module conventions from plain TypeScript/JavaScript or Vue 3 `<script setup>` codebases.
This record applies the ADR 0008 selection rule and measurement method to 20 public Vue 2 repositories.

### Selection rule and run

- Query on 2026-11-22: public Vue repositories created before `2022-01-01` (`fork:false archived:false`) whose `package.json` declares `vue` major version `2` and that contain `.vue` files.
- Take 20 repositories passing the ADR 0008 exclusions (>= 5,000 Production source lines, Generated + Vendored <= Production, and `codeint check` exits 0).
- Pin each repository at the last commit on its default branch dated before `2023-01-01`.
- Measured with `codeint 0.4.0` release build (default clone size 75 tokens, filter 14 distinct normalized tokens) on Apple Silicon.
- Run time across the 20 repositories: 0.010s to 1.375s per repository (0 unparsable files).

### Panel

| Repository | Stars band | Pinned commit | Production lines |
| ---------- | ---------- | ------------- | ---------------- |
| `FreeTubeApp/FreeTube` | 10k to 25k | `b96c6b554222412014e9e8ac7e2e48ce4e33fffe` | 17,794 |
| `museui/muse-ui` | 5k to 10k | `e799a4ff3854b9341e2207720c0937b1ba040bbc` | 12,609 |
| `VueTorrent/VueTorrent` | 5k to 10k | `b53c331d4c98635f38945d9898ab72358bb7bf34` | 8,737 |
| `hinesboy/mavonEditor` | 5k to 10k | `d5c6284037e21909c8d2558f500b82a1241e548a` | 7,356 |
| `xyxiao001/vue-cropper` | under 5k | `823a1d88d0871b69c0e6d2aa6e3a893a53348a45` | 5,906 |
| `NervJS/taro` | 25k to 50k | `9f4baeefcb5ef82356b672fa53611ec6ea2a241d` | 93,970 |
| `surveyjs/survey-library` | under 5k | `21f4f11b6c29c52e5feb235ef74d50c01229f866` | 79,041 |
| `statping/statping` | 5k to 10k | `aa515545dba227a97a5e705bb23bfc87d5e312e7` | 16,625 |
| `KlausSchaefers/quant-ux` | under 5k | `788961f3b01efd89fc071b8479a6fcdc8f0a4c15` | 93,644 |
| `Geek-James/ddBuy` | under 5k | `62495996adc35cc7f075b71b5a19cec49f8d1c63` | 7,865 |
| `tookit/vue-material-admin` | under 5k | `6d67e0fe82e1b01e4e89d868614d4773de67e745` | 7,419 |
| `jsbroks/coco-annotator` | under 5k | `9cce5d2f64944e2aa7ca829ca4032624e3305138` | 8,074 |
| `4xmen/anubias` | under 5k | `94df5c585e9b81451e09a4a903233b57f097e59c` | 5,491 |
| `mainsail-crew/mainsail` | under 5k | `c2ecc845cadcb998875f3ab8069a5f76afe86ed9` | 23,718 |
| `tuandm/laravue` | under 5k | `b56ec7526e47f06a37ca79cc356f545fcef21f34` | 11,048 |
| `getgridea/gridea` | 10k to 25k | `0374add4ff98afcab2c2a8b0c5d1473408917bd9` | 6,528 |
| `vform666/variant-form` | under 5k | `9e20d046c507a83ab85972f2d4003d93bc6dc6b4` | 12,256 |
| `bootstrap-vue/bootstrap-vue` | 10k to 25k | `c597779a8296edc68be719e10330c4d9b74cbc8e` | 29,234 |
| `requarks/wiki` | 25k to 50k | `bfbb64a749b9d93f45f4df7e5ef846faf992f390` | 33,058 |
| `owncloud/web` | under 5k | `57ca0720be49891dd283eac99769555774e1fdf2` | 34,950 |

## Measurements

### Per Metric, over the 20 repositories

| Metric | Mean | Median | Standard deviation | 10th percentile | 90th percentile | Lowest | Highest |
| ------ | ---- | ------ | ------------------ | --------------- | --------------- | ------ | ------- |
| Erosion | 0.259 | 0.287 | 0.156 | 0.020 | 0.452 | 0.000 | 0.599 |
| Verbosity | 0.129 | 0.103 | 0.173 | 0.036 | 0.192 | 0.011 | 0.844 |
| Duplication | 0.128 | 0.101 | 0.173 | 0.036 | 0.192 | 0.009 | 0.844 |
| Import cycles | 0.024 | 0.000 | 0.047 | 0.000 | 0.114 | 0.000 | 0.160 |

### Per repository, in the Production Source set

| Repository | Erosion | Verbosity | Duplication | Import cycles |
| ---------- | ------- | --------- | ----------- | ------------- |
| `FreeTubeApp/FreeTube` | 0.286 | 0.108 | 0.105 | 0.010 |
| `museui/muse-ui` | 0.185 | 0.055 | 0.055 | 0.000 |
| `VueTorrent/VueTorrent` | 0.102 | 0.011 | 0.011 | 0.015 |
| `hinesboy/mavonEditor` | 0.314 | 0.228 | 0.228 | 0.000 |
| `xyxiao001/vue-cropper` | 0.599 | 0.844 | 0.844 | 0.000 |
| `NervJS/taro` | 0.352 | 0.105 | 0.103 | 0.013 |
| `surveyjs/survey-library` | 0.202 | 0.102 | 0.099 | 0.160 |
| `statping/statping` | 0.478 | 0.108 | 0.107 | 0.000 |
| `KlausSchaefers/quant-ux` | 0.288 | 0.142 | 0.141 | 0.004 |
| `Geek-James/ddBuy` | 0.000 | 0.011 | 0.009 | 0.000 |
| `tookit/vue-material-admin` | 0.022 | 0.060 | 0.059 | 0.112 |
| `jsbroks/coco-annotator` | 0.327 | 0.057 | 0.057 | 0.000 |
| `4xmen/anubias` | 0.312 | 0.189 | 0.188 | 0.000 |
| `mainsail-crew/mainsail` | 0.331 | 0.124 | 0.124 | 0.007 |
| `tuandm/laravue` | 0.000 | 0.072 | 0.071 | 0.000 |
| `getgridea/gridea` | 0.219 | 0.038 | 0.038 | 0.000 |
| `vform666/variant-form` | 0.187 | 0.104 | 0.103 | 0.000 |
| `bootstrap-vue/bootstrap-vue` | 0.384 | 0.041 | 0.041 | 0.000 |
| `requarks/wiki` | 0.449 | 0.120 | 0.118 | 0.022 |
| `owncloud/web` | 0.137 | 0.060 | 0.060 | 0.131 |

## Decision

**When a repository measures `.vue` files and `package.json` declares `vue` major version `2`, codeint shows the 10th to 90th percentile of this panel as its Reference range.**
The source label reads `codeint panel of 20 Vue 2 repositories, ADR 0014, codeint 0.4.0`.

| Metric | Reference range |
| ------ | --------------- |
| Erosion | 0.020 to 0.452 |
| Verbosity | 0.036 to 0.192 |
| Duplication | 0.036 to 0.192 |
| Import cycles | 0.000 to 0.114 |

## Consequences

- Vue 2 repositories keep full cross-file `.ts`/`.js`/`.vue` Import cycle resolution inside `typescript-javascript` while displaying Vue 2 Reference ranges automatically.
- No code, fixture, or text of a panel repository enters codeint; this record holds only names, commits, and numbers.
- Any future change to default Metric rules or Source set rules requires re-measuring the panel and amending this record.
99 changes: 99 additions & 0 deletions docs/adr/0015-vue3-reference-ranges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
status: accepted
---

# Vue 3 Reference ranges come from a panel of 20 public repositories

The Owner approved calibrating separate Vue 2 and Vue 3 Reference ranges on 2026-11-22 using the pre-2023 human-written selection rule established in [ADR 0008](./0008-typescript-reference-ranges.md).

## Context

Vue 3 Single-File Components (`.vue`) adopt the Composition API and `<script setup>` alongside TypeScript, producing different entropy distributions from Vue 2 Options API codebases.
This record applies the ADR 0008 selection rule and measurement method to 20 public Vue 3 repositories.

### Selection rule and run

- Query on 2026-11-22: public Vue repositories created before `2022-01-01` (`fork:false archived:false`) whose `package.json` declares `vue` major version `3` and that contain `.vue` files.
- Take 20 repositories passing the ADR 0008 exclusions (>= 5,000 Production source lines, Generated + Vendored <= Production, and `codeint check` exits 0).
- Pin each repository at the last commit on its default branch dated before `2023-01-01`.
- Measured with `codeint 0.4.0` release build (default clone size 75 tokens, filter 14 distinct normalized tokens) on Apple Silicon.
- Run time across the 20 repositories: 0.008s to 0.490s per repository (0 unparsable files).

### Panel

| Repository | Stars band | Pinned commit | Production lines |
| ---------- | ---------- | ------------- | ---------------- |
| `AutomaApp/automa` | 10k to 25k | `f0dca888589437acc49ba1f54c9d0dc221dd7077` | 32,720 |
| `snapshot-labs/snapshot-v1` | 5k to 10k | `1a50981f459079bf3a1236f5cc7cac0bccde97e5` | 14,660 |
| `heyui/heyui` | under 5k | `c5b42abf2c37d7fde21a88229beb0b3592bdde6d` | 15,150 |
| `tobe-fe-dalao/fast-vue3` | under 5k | `470105d576e90ae40a5aa433a78d62dfa7a617d8` | 14,607 |
| `MelihAltintas/vue3-openlayers` | under 5k | `eb300feeecb9d1b6747857568af47b8bdea5a8d2` | 5,011 |
| `antoniandre/wave-ui` | under 5k | `efc69ca46b41c34d857685400812bdd5279e307d` | 21,931 |
| `vuefront/vuefront` | under 5k | `06083a96dc46a455c98737ef35868dbc549a92c8` | 31,113 |
| `logaretm/vee-validate` | 10k to 25k | `5265af5c75b7809ebd73b22d4c8319a8a146da5a` | 5,523 |
| `JosephusPaye/Keen-UI` | under 5k | `9d6ff42b02569a2fc5541faa275339b06eae1cfa` | 85,013 |
| `buqiyuan/vite-vue3-lowcode` | under 5k | `035663eb3b8198404245f68df49fe00799ca27c3` | 7,302 |
| `intlify/vue-i18n` | under 5k | `fb6775a40448a0023b0edb281f7dd25e8a52f478` | 17,286 |
| `imzbf/md-editor-v3` | under 5k | `8a78897d6d6ec9149621e79dea0112a2f76da1c4` | 6,115 |
| `epicmaxco/vuestic-admin` | 10k to 25k | `5a3204f24aa1586c98316cd6208dabbf7f3fd8bc` | 7,183 |
| `varletjs/varlet` | 5k to 10k | `54e0ab80323437f226b869e564e7d0d04dba8bb1` | 24,034 |
| `epicmaxco/vuestic-ui` | under 5k | `5ef276e4e7423c5690b7c265c99472225cdd5343` | 36,379 |
| `antares-sql/antares` | under 5k | `6fa430adf68013a9d0a093031f56dd741bdc0299` | 29,449 |
| `open-source-labs/OverVue` | under 5k | `81ddfe9772f971f65f3585f97638c4ca482550bf` | 8,608 |
| `staniel359/muffon` | under 5k | `d58b54ab42fea3c8dedbc76eb90818905bb4604e` | 66,836 |
| `hoppscotch/hoppscotch` | 50k to 100k | `acafc072db28db247321d9c624734d3620d2c145` | 32,986 |
| `nuxt/nuxt` | 50k to 100k | `0a701ae7b3cae6e18ee26439c20eae8a3f63236f` | 13,043 |

## Measurements

### Per Metric, over the 20 repositories

| Metric | Mean | Median | Standard deviation | 10th percentile | 90th percentile | Lowest | Highest |
| ------ | ---- | ------ | ------------------ | --------------- | --------------- | ------ | ------- |
| Erosion | 0.211 | 0.191 | 0.167 | 0.019 | 0.388 | 0.000 | 0.636 |
| Verbosity | 0.164 | 0.113 | 0.201 | 0.024 | 0.346 | 0.010 | 0.870 |
| Duplication | 0.163 | 0.112 | 0.201 | 0.023 | 0.345 | 0.010 | 0.870 |
| Import cycles | 0.032 | 0.013 | 0.041 | 0.000 | 0.077 | 0.000 | 0.133 |

### Per repository, in the Production Source set

| Repository | Erosion | Verbosity | Duplication | Import cycles |
| ---------- | ------- | --------- | ----------- | ------------- |
| `AutomaApp/automa` | 0.269 | 0.028 | 0.028 | 0.000 |
| `snapshot-labs/snapshot-v1` | 0.084 | 0.025 | 0.024 | 0.062 |
| `heyui/heyui` | 0.277 | 0.047 | 0.045 | 0.000 |
| `tobe-fe-dalao/fast-vue3` | 0.259 | 0.326 | 0.326 | 0.000 |
| `MelihAltintas/vue3-openlayers` | 0.127 | 0.192 | 0.192 | 0.000 |
| `antoniandre/wave-ui` | 0.128 | 0.076 | 0.076 | 0.000 |
| `vuefront/vuefront` | 0.057 | 0.523 | 0.523 | 0.000 |
| `logaretm/vee-validate` | 0.206 | 0.041 | 0.041 | 0.026 |
| `JosephusPaye/Keen-UI` | 0.289 | 0.870 | 0.870 | 0.000 |
| `buqiyuan/vite-vue3-lowcode` | 0.022 | 0.074 | 0.074 | 0.044 |
| `intlify/vue-i18n` | 0.559 | 0.153 | 0.151 | 0.041 |
| `imzbf/md-editor-v3` | 0.636 | 0.114 | 0.113 | 0.128 |
| `epicmaxco/vuestic-admin` | 0.000 | 0.010 | 0.010 | 0.000 |
| `varletjs/varlet` | 0.127 | 0.111 | 0.111 | 0.052 |
| `epicmaxco/vuestic-ui` | 0.106 | 0.044 | 0.044 | 0.030 |
| `antares-sql/antares` | 0.335 | 0.182 | 0.181 | 0.133 |
| `open-source-labs/OverVue` | 0.198 | 0.145 | 0.144 | 0.000 |
| `staniel359/muffon` | 0.000 | 0.145 | 0.143 | 0.000 |
| `hoppscotch/hoppscotch` | 0.184 | 0.164 | 0.163 | 0.071 |
| `nuxt/nuxt` | 0.369 | 0.010 | 0.010 | 0.060 |

## Decision

**When a repository measures `.vue` files and `package.json` declares `vue` major version `3`, codeint shows the 10th to 90th percentile of this panel as its Reference range.**
The source label reads `codeint panel of 20 Vue 3 repositories, ADR 0015, codeint 0.4.0`.

| Metric | Reference range |
| ------ | --------------- |
| Erosion | 0.019 to 0.388 |
| Verbosity | 0.024 to 0.346 |
| Duplication | 0.023 to 0.345 |
| Import cycles | 0.000 to 0.077 |

## Consequences

- Vue 3 repositories keep full cross-file `.ts`/`.js`/`.vue` Import cycle resolution inside `typescript-javascript` while displaying Vue 3 Reference ranges automatically.
- No code, fixture, or text of a panel repository enters codeint; this record holds only names, commits, and numbers.
- Any future change to default Metric rules or Source set rules requires re-measuring the panel and amending this record.
4 changes: 3 additions & 1 deletion docs/guide/languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Each plugin parses the modern superset of its language family with no language-v

| Plugin name | Extensions | Workspace manifest | Default Test / Generated rules |
| ----------- | ---------- | ------------------ | ------------------------------ |
| `typescript-javascript` | `.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs`, `.cjs` | `package.json` (npm, Yarn, Bun) / `pnpm-workspace.yaml` | `*.test.*`, `*.spec.*`, `__tests__/`, `test/`, `tests/` |
| `typescript-javascript` | `.ts`, `.tsx`, `.mts`, `.cts`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.vue`, `.svelte` | `package.json` (npm, Yarn, Bun) / `pnpm-workspace.yaml` | `*.test.*`, `*.spec.*`, `__tests__/`, `test/`, `tests/`; `.vue` and `.svelte` measure `<script>` blocks only |
| `rust` | `.rs` | `Cargo.toml` | `tests/`, `benches/`, `examples/`, `tests.rs`, `*_test.rs`, `*_tests.rs`; inline `#[cfg(test)]` excluded from Production |
| `php` | `.php` | `composer.json` (`repositories` of type `path`) | `tests/`, `test/`, `*Test.php`, `*.test.php` |
| `dart` | `.dart` | `pubspec.yaml` (`workspace`) | `test/`, `tests/`, `integration_test/`, `*_test.dart`; `*.g.dart`, `*.freezed.dart`, `*.gr.dart`, `*.mocks.dart`, `*.pb*.dart` -> Generated |
Expand All @@ -22,6 +22,8 @@ Measured across 20 pre-2023 public repositories per language (10th to 90th perce
| Language | Erosion | Duplication | Verbosity | Import cycles | Record |
| -------- | ------- | ----------- | --------- | ------------- | ------ |
| TypeScript / JavaScript | 35.2% to 60.0% | 1.7% to 34.6% | 1.8% to 34.7% | 0.0% to 30.8% | [ADR 0008](../adr/0008-typescript-reference-ranges.md) |
| Vue 2 (`.vue`) | 2.0% to 45.2% | 3.6% to 19.2% | 3.6% to 19.2% | 0.0% to 11.4% | [ADR 0014](../adr/0014-vue2-reference-ranges.md) |
| Vue 3 (`.vue`) | 1.9% to 38.8% | 2.3% to 34.5% | 2.4% to 34.6% | 0.0% to 7.7% | [ADR 0015](../adr/0015-vue3-reference-ranges.md) |
| Rust | 38.0% to 64.2% | 5.0% to 32.5% | 6.0% to 32.9% | 2.1% to 50.6% | [ADR 0010](../adr/0010-rust-reference-ranges.md) |
| PHP | 5.5% to 67.7% | 4.1% to 29.0% | 4.2% to 29.2% | 0.0% to 10.7% | [ADR 0011](../adr/0011-php-reference-ranges.md) |
| Dart | 4.7% to 41.9% | 7.3% to 25.6% | 8.0% to 25.9% | 7.3% to 52.4% | [ADR 0012](../adr/0012-dart-reference-ranges.md) |
Expand Down
2 changes: 2 additions & 0 deletions llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@
- [ADR 0011: PHP Reference ranges](docs/adr/0011-php-reference-ranges.md)
- [ADR 0012: Dart Reference ranges](docs/adr/0012-dart-reference-ranges.md)
- [ADR 0013: Python Reference ranges](docs/adr/0013-python-reference-ranges.md)
- [ADR 0014: Vue 2 Reference ranges](docs/adr/0014-vue2-reference-ranges.md)
- [ADR 0015: Vue 3 Reference ranges](docs/adr/0015-vue3-reference-ranges.md)
6 changes: 4 additions & 2 deletions plugins/languages/ts/HOW-TO.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,7 @@ fn find_empty_statements(program: &Program<'_>, _code: &str) -> Vec<Span> {

- `reference_ranges` in `src/lib.rs` returns the 10th to 90th percentile ranges from [ADR 0008](../../../docs/adr/0008-typescript-reference-ranges.md).
Its source label is `codeint panel of 20 TypeScript and JavaScript repositories, ADR 0008, codeint 0.1.0`.
- Measure the panel again and amend ADR 0008 whenever Metric rules, the default rule set, or Source set rules change.
- Prove a change in `tests/conformance.rs` and `crates/cli/tests/check.rs`.
- `vue_reference_ranges` in `src/sfc.rs` selects the calibrated Vue 2 Reference ranges ([ADR 0014](../../../docs/adr/0014-vue2-reference-ranges.md)) or Vue 3 Reference ranges ([ADR 0015](../../../docs/adr/0015-vue3-reference-ranges.md)) when `.vue` files are measured and `package.json` declares `vue` major version 2 or 3.
- `src/sfc.rs` extracts `<script>`, `<script setup>`, `<script context="module">`, and `<script module>` blocks from `.vue` and `.svelte` Single-File Components while preserving original 1-based line numbers and skipping HTML templates and CSS styles.
- Measure the panel again and amend the relevant ADR whenever Metric rules, the default rule set, or Source set rules change.
- Prove a change in `tests/conformance.rs`, `tests/sfc.rs`, and `crates/cli/tests/check.rs`.
Loading
Loading