mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-25 15:01:49 +00:00
7df11ed734
* refactor(lint): extract custom oxlint rules into separate files Split `tools/lint/rules.js` into one file per rule under `tools/lint/rules/`. Also simplify `test-root-describe` with early-exit guard clauses. * feat(lint): add `enforce-ts-extension` oxlint rule Add a custom JS-based oxlint rule that enforces `.ts` extensions on local imports. The rule catches two problems: - `.js` extension used instead of `.ts` (auto-fixable) - missing file extension entirely (report only) Checked locations: - static import/export declarations - dynamic `import()` expressions - vitest module APIs: `vi.mock`, `vi.doMock`, `vi.unmock`, `vi.doUnmock`, `vi.importActual`, `vi.importMock` Both relative paths (`./`, `../`) and path aliases (`~test/`) are treated as local. Package imports are ignored. Also fixes 26 pre-existing violations across 18 spec files. * Update tools/lint/rules/enforce-ts-extension.js Co-authored-by: Anne Stellingwerf <1637358+astellingwerf@users.noreply.github.com> --------- Co-authored-by: Anne Stellingwerf <1637358+astellingwerf@users.noreply.github.com>