Skip to content

Resolve minor linter findings#1395

Merged
RandomByte merged 2 commits into
mainfrom
refactor/lint-findings
May 22, 2026
Merged

Resolve minor linter findings#1395
RandomByte merged 2 commits into
mainfrom
refactor/lint-findings

Conversation

@RandomByte
Copy link
Copy Markdown
Member

@RandomByte RandomByte commented May 22, 2026

Prompted by #1391 (credit to @EdrilanBerisha) I ran the "recommended" rules of https://github.com/sindresorhus/eslint-plugin-unicorn (which includes a "no-negation-in-equality-check" rule that is missing from eslint).

There are a lot of stylistic findings, and only two seem to have actual impact at runtime. Hence not adding unicorn as a plugin but fixing the two identified problems.

The early-return check `!projectCustomMiddleware.length === 0` parses as
`(!length) === 0`, which is always false for both empty and non-empty
arrays. The branch never fired, but the for-loop below already handles
empty arrays as a no-op, so behavior was unchanged.

Initially found by @EdrilanBerisha in
#1391
The TypeError thrown when a sap.ui.define dependency element is not a
string literal had no message, leaving no context when the build failed
on malformed input.
Copy link
Copy Markdown
Member

@codeworrior codeworrior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RandomByte RandomByte merged commit e080d42 into main May 22, 2026
59 checks passed
@RandomByte RandomByte deleted the refactor/lint-findings branch May 22, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants