Commit Graph

24 Commits

Author SHA1 Message Date
Sebastian Poxhofer 97327c3d28 refactor(linters): add prefer-coerce-array rule (#45492)
* refactor(linters): add prefer-coerce-array rule

Refs #45217

`x ?? []` and `coerceArray(x)` say the same thing, but only the second
one is searchable and consistent. The rule flags a `??` whose default is
a bare `[]` literal; a non-empty default or an asserted `([] as Foo[])`
still passes.

Applying it across `lib/` surfaced three spots the helper cannot cover,
which keep `?? []` with a disable comment or a narrower fix:

- `package-files.ts` destructures a tuple, which `coerceArray()` widens
- `generate.spec.ts` defaults `matchAll()`, an iterator rather than an array
- `mise/upgradeable-tooling.ts` declares a `Record` return, so its
  `?? []` fallback was wrong to begin with and becomes `coerceObject()`

* refactor(platform/github): hoist the GHE version header lookup

`Object.entries(...).find()` returns a tuple, and defaulting it with
`?? []` only to destructure the second element reads as an array
default when it is not one. Name the found entry instead, which drops
the `?? []` rather than routing a tuple through `coerceArray()`.
2026-08-28 09:27:58 +00:00
renovate[bot] 196101a6bb chore(deps): update dependency oxlint-tsgolint to v0.25.0 (main) (#44424)
* chore(deps): update dependency oxlint-tsgolint to v0.25.0

| datasource | package         | from   | to     |
| ---------- | --------------- | ------ | ------ |
| npm        | oxlint-tsgolint | 0.23.0 | 0.25.0 |

* chore: fix new no-unnecessary-type-assertion findings

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Poxhofer <sebastian.poxhofer@stedi.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 07:04:21 +00:00
RahulGautamSingh 1ccee6b591 refactor: massage minimumRelaseAge="0days" to null (#42053)
massage minimumRelaseAge=0days to null
2026-03-22 18:23:43 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
Michael Kriese c641239c19 fix: use stricter types for renovate config (#39594)
* fix: use stricter types for renovate config

* fix: revert changes

* Apply suggestions from code review
2025-11-28 13:16:27 +00:00
RahulGautamSingh 76f911041a refactor: use named exports (#39196)
* use named exports

* fix test

* add missing imnport

* fix prettier
2025-11-10 12:00:35 +00:00
RahulGautamSingh 9c29755756 refactor(config/massage): remove irrelevant code (#32971) 2024-12-08 11:58:11 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Sergei Zharinov 53263bbfda feat: Clone objects via wrapper (#22970) 2023-06-27 13:09:59 +00:00
Jamie Magee a6dfa70c1d chore: migrate to structuredClone (#20885)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-04-27 05:06:22 +00:00
Rhys Arkins 8d0c72af06 fix(config): filter out invalid massaged packageRules (#16778)
Closes #16777
2022-07-26 08:25:37 +03:00
Michael Kriese 10302eba68 refactor: fix prefer-nullish-coalescing (#16171) 2022-06-21 12:02:49 +00:00
Rhys Arkins e8f68c4b63 fix(config): do not massage lockFileMaintenance (#11522) 2021-09-01 13:23:39 +00:00
Rhys Arkins 750bc1656e refactor: config/definitions -> config/options 2021-08-17 07:57:45 +02:00
Rhys Arkins f0a193dc13 fix(config): drop non-selectors when cloning rules 2021-05-15 14:44:47 +02:00
Rhys Arkins 3357e6333d refactor: Object.assign -> object spread (#9076) 2021-03-11 08:03:37 +01:00
Michael Kriese 74d7691bef refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
Sergei Zharinov 72b0b85640 feat(config): Rename packageRules selectors (#6939) 2021-01-29 11:43:42 +01:00
renovate[bot] 9f6c193557 build(deps): update dependency @sindresorhus/is to v3.1.0 (#6867)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2020-07-30 06:54:20 +02:00
Rhys Arkins 53ca91301f chore: import linting (#6105) 2020-05-01 18:03:48 +02:00
renovate[bot] 4f59b62da4 chore(deps): update dependency prettier to v2 (#5952)
* chore(deps): update dependency prettier to v2

* Run prettier-fix

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
2020-04-12 18:09:36 +02:00
Michael Kriese 6c4892b593 chore(types): fix more typescript types (#5615) 2020-03-02 12:06:16 +01:00
Michael Kriese 79f72f0b5d chore: move clone to utils (#4434) 2019-09-06 06:48:25 +02:00
Michael Kriese 2b11b661ed feat(config): convert to ts (#4299) 2019-08-23 15:46:31 +02:00