Commit Graph

13 Commits

Author SHA1 Message Date
Sebastian Poxhofer 58771bb183 refactor(linters): enabled oxlints func-style (#44691)
* refactor(oxlint): enable func-style

Enable the built-in func-style rule as ["warn", "declaration"] so that
named functions are written as function declarations instead of arrow or
function expressions assigned to variables, matching the convention in
docs/development/best-practices.md (Functions section). Inline arrow
callbacks are unaffected; prefer-arrow-callback continues to cover the
callback direction.

Severity is "warn" instead of "error" as a fallback: a repo-wide run
found 196 pre-existing violations (70 in spec files, 126 in production
code), exceeding the 80-violation fix threshold for this change, so no
violations were fixed here. Follow-up work can convert the offenders
(largest clusters: lib/modules/versioning/ruby, lib/util/cache/package,
lib/modules/versioning/maven, lib/modules/versioning/gradle) and then
raise the rule to "error". Note oxlint 1.72 also supports an
allowTypeAnnotation option if typed consts should remain arrows.

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

* ci(linter): enforce func-style at error

* refactor(func-style): convert const-arrow functions to declarations in with-cache spec and ruby versioning

* refactor(func-style): convert const-arrow functions to declarations in maven/gradle modules

* refactor(func-style): convert const-arrow functions to declarations in remaining versioning modules

* refactor(func-style): convert const-arrow functions to declarations in platform modules

Discriminated-union closures (ensureCommentRemoval byTopic/byContent
helpers in github, gitlab, bitbucket, bitbucket-server) needed the
narrowed field passed explicitly as a parameter, since function
declarations are hoisted and lose the outer if-narrowing that inline
arrow-function closures previously relied on.

* refactor(func-style): convert const-arrow functions to declarations across util/manager/datasource modules

One case (logger/renovate-logger.ts logOnceFn) is kept as an arrow
function with a documented oxlint-disable: it is stored on
this.logger.once[level] and relies on lexically-bound this, which a
hoisted function declaration would not preserve.

* refactor(func-style): convert remaining const-arrow test helpers to declarations

get-updated.spec.ts: hoisted expectPipCompilePackageAndLockFile to
module scope (it only closes over the module-level pipCompile mock)
and added a documented oxlint-disable for vitest/expect-expect on its
caller test, since oxlint's expect-expect check does not trace
assertions through an externally-defined helper function.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 11:14:22 +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
Sergei Zharinov ae49b7af38 chore(deps): switch to @renovatebot/good-enough-parser (#40623)
* chore(deps): switch to @jrnv/good-enough-parser

* chore(deps): switch to @renovatebot/good-enough-parser

* chore(deps): update @renovatebot/good-enough-parser to 1.2.0
2026-01-26 12:44:11 +00:00
Johannes Feichtner 4137244b4e feat(gradle): add support for exclusiveContent() repository definitions (#35421) 2025-04-17 13:44:30 +00:00
Johannes Feichtner 5658777d7a refactor(gradle): unify handling of custom and predefined registry URLs (#34714) 2025-03-12 10:15:08 +00:00
Johannes Feichtner aae045edf5 feat(gradle): add support for gradle repository content descriptors (#33692)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-02-04 17:16:51 +00:00
Johannes Feichtner 6cf23f2bf1 refactor(gradle): extract redundant functions and remove snapshot (#33430) 2025-01-09 07:22:45 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Johannes Feichtner bfc38bf732 feat(manager/gradle): replace individual value matchers with placeholder (#19996) 2023-02-03 18:36:00 +00:00
Johannes Feichtner 0eb77da9cf feat(manager/gradle): enable support for concatenated properties (#19659)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
2023-01-05 14:43:52 +01:00
Johannes Feichtner 80d53a1222 feat(manager/gradle): enable property accessors for registry URLs (#19609) 2022-12-29 22:26:02 +01:00
Johannes Feichtner 0fc1731eed feat(manager/gradle): support separate registry URLs for plugins (#19606) 2022-12-29 18:41:43 +00:00
Johannes Feichtner 6beeba6f02 refactor(manager/gradle): group parser directives in separate files (#19465) 2022-12-18 08:25:44 +01:00