fix(lint): validate config names against both index.d.ts and index.d.v5.ts#8465
Conversation
supported-configurations.json has no per-major-version distinction, so the check produces false positives now that index.d.ts and index.d.v5.ts define different type surfaces per major version. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
✨ Fix all issues with BitsAI or with Cursor
|
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…sync rule iast.securityControlsConfiguration is a v6-only config not yet exposed in index.d.ts, so add it to IGNORED_CONFIGURATION_NAMES instead of disabling the entire configurationMissingInIndexDts check. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
BenchmarksBenchmark execution time: 2026-05-13 19:33:10 Comparing candidate commit d3ff8e5 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1496 metrics, 97 unstable metrics. |
…v5.ts The configurationMissingInIndexDts check now accepts an array of type files and unions their names, so a config present in either v5 or v6 types is not flagged. This avoids false positives on release branches where the two type surfaces diverge. Wire up both index.d.ts and index.d.v5.ts in eslint.config.mjs and remove the iast.securityControlsConfiguration workaround from IGNORED_CONFIGURATION_NAMES, which is now covered by index.d.v5.ts. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Overall package sizeSelf size: 5.85 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 809917124c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The configurationMissingInSupportedConfigurations check now only uses the primary (v6) index.d.ts, while the forward check still unions all provided files. This prevents false positives for v5-only configs like iast.securityControlsConfiguration that are intentionally absent from the v6 type surface. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…v5.ts (#8465) Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…v5.ts (#8465) Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Summary
eslint-config-names-syncrule to accept an array of type definition files (indexDtsPaths) instead of a single pathindex.d.ts(v6) orindex.d.v5.ts(v5) is not flaggedeslint.config.mjsto prevent false positives on release branches where the two type surfaces divergeiast.securityControlsConfigurationworkaround fromIGNORED_CONFIGURATION_NAMES— it is now correctly covered byindex.d.v5.tsindex.d.v5.tsto theiast-canonical-still-checkedtest fixture to cover the multi-file scenarioMotivation
supported-configurations.jsonis shared across all major versions, butindex.d.ts(v6) andindex.d.v5.ts(v5) define different type surfaces. The previous single-file check produced false positives for configs that exist in only one version's types (e.g.iast.securityControlsConfigurationis in v5 but not v6). This would cause failures on release branches.Test plan
npm run test:eslint-rulespasses